Metadata-Version: 2.4
Name: py-jxz
Version: 0.1.6
Summary: Python library for building, reading, and verifying .jxz signed containers
Project-URL: Homepage, https://github.com/jux-tools/py-jxz
Project-URL: Documentation, https://github.com/jux-tools/py-jxz#readme
Project-URL: Repository, https://github.com/jux-tools/py-jxz.git
Project-URL: Issues, https://github.com/jux-tools/py-jxz/issues
Project-URL: Changelog, https://github.com/jux-tools/py-jxz/blob/main/CHANGELOG.md
Author-email: Georges Martin <jrjsmrtn@gmail.com>
License-Expression: Apache-2.0
License-File: LICENSE
Keywords: container,junit,jxz,signing,xml,xmldsig,zip
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Software Development :: Testing
Classifier: Typing :: Typed
Requires-Python: >=3.11
Requires-Dist: cryptography>=42.0
Requires-Dist: signxml>=4.0
Provides-Extra: cli
Requires-Dist: rich>=13.0; extra == 'cli'
Provides-Extra: dev
Requires-Dist: hypothesis>=6.0; extra == 'dev'
Requires-Dist: lxml-stubs>=0.5; extra == 'dev'
Requires-Dist: mypy>=1.10; extra == 'dev'
Requires-Dist: pre-commit>=3.0; extra == 'dev'
Requires-Dist: pytest-cov>=4.0; extra == 'dev'
Requires-Dist: pytest>=8.0; extra == 'dev'
Requires-Dist: rich>=13.0; extra == 'dev'
Requires-Dist: ruff>=0.4; extra == 'dev'
Description-Content-Type: text/markdown

<!-- SPDX-FileCopyrightText: 2026 Georges Martin <jrjsmrtn@gmail.com> -->
<!-- SPDX-License-Identifier: Apache-2.0 -->

# py-jxz

Python library for building, reading, and verifying `.jxz` signed containers.

The `.jxz` format packages signed JUnit XML test reports with attachments for secure transmission, as specified by the [jux-container-format](https://github.com/jux-tools/jux-container-format) specification.

## Features

- **Build** `.jxz` containers from JUnit XML reports and attachments
- **Read** and extract `.jxz` containers with digest validation
- **Sign** containers with detached XMLDSIG signatures
- **Verify** signatures and SHA-256 manifest digests
- **Minimal dependencies**: `signxml` + `cryptography` beyond stdlib

## Installation

```bash
pip install py-jxz
```

## Quick Start

### Build a container

```python
from jxz import ContainerBuilder

builder = ContainerBuilder()
builder.set_report(junit_xml_bytes)
builder.add_attachment("screenshots/login.png", png_bytes)

# Unsigned
jxz_bytes = builder.build()

# Signed
jxz_bytes = builder.build(private_key=key, certificate=cert)
```

### Read and verify a container

```python
from jxz import ContainerReader

reader = ContainerReader(jxz_bytes)
reader.verify()
report = reader.get_report()
attachments = reader.get_attachments()
```

## Documentation

- [Format Specification](https://github.com/jux-tools/jux-container-format)
- [Changelog](CHANGELOG.md)

## Related Projects

| Project | Description |
|---------|-------------|
| [jux-container-format](https://github.com/jux-tools/jux-container-format) | `.jxz` format specification |
| [py-juxlib](https://github.com/jux-tools/py-juxlib) | Jux client library (depends on py-jxz) |
| [jux-openapi](https://github.com/jux-tools/jux-openapi) | Jux REST API specification |

## License

Apache-2.0
