Metadata-Version: 2.4
Name: taylor-suit
Version: 0.2.1
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Rust
Classifier: Topic :: Software Development :: Embedded Systems
Requires-Dist: pytest ; extra == 'test'
Requires-Dist: cbor2 ; extra == 'test'
Requires-Dist: cryptography ; extra == 'test'
Provides-Extra: test
License-File: LICENSES/LICENSE-APACHE
License-File: LICENSES/LICENSE-MIT
Summary: Generates IETF SUIT manifests, CBOR-encoded, from a JSON description
Keywords: suit,cbor,firmware,manifest,iot
License-Expression: MIT OR Apache-2.0
Requires-Python: >=3.9
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: Repository, https://github.com/ariel-os/taylor

# taylor-suit

Python bindings for [taylor](https://github.com/ariel-os/taylor), which generates
[IETF SUIT](https://www.rfc-editor.org/rfc/rfc9736) manifests, CBOR-encoded, from a JSON
description. The package is imported as `taylor` and also installs a `taylor` command that
behaves like the Rust CLI.

```sh
pip install taylor-suit
```

```python
import taylor

manifest = {
    "version": 1,
    "sequence-number": 1,
    "suit-common": {"suit-components": [["00"]], "suit-shared-sequence": []},
}
unsigned = taylor.build_envelope(manifest)
signed = taylor.build_envelope(manifest, key_path="key.pem")
```

- `build_envelope` and `encode_manifest` accept the manifest as JSON text or as a mapping.
- Signing keys are PEM-encoded ES256 or ES384 private keys, given either as text or bytes
  (`key_pem`) or as a file path (`key_path`).
- `render_template` renders a minijinja template into manifest JSON.
- Errors are raised as `taylor.ManifestError`, `taylor.TemplateError`, or
  `taylor.SigningError`, all subclasses of `taylor.TaylorError`.

If the Rust binary is also installed with `cargo install taylor`, whichever `taylor` comes
first on `PATH` runs; both accept the same arguments, but their versions may differ.

See the [project README](https://github.com/ariel-os/taylor#readme) for the JSON manifest
format and the supported SUIT members, directives, and conditions.

