swarmauri_xmp_png
swarmauri_xmp_png packages the production-grade PNGXMP handler. It reads, writes, and removes XMP packets stored in uncompressed iTXt chunks that follow Adobe's keyword guidance, making it immediately compatible with downstream asset pipelines.
Features
- Registry-ready – inherits from
EmbedXmpBaseso Swarmauri's dynamic registry can auto-discover the handler. - Spec compliant – emits iTXt chunks with the
XML:com.adobe.xmpkeyword and UTF-8 payloads. - Safety guards –
_ensure_xmlperforms a minimal RDF/XML check before embedding metadata.
Installation
Choose the tool that matches your workflow:
# pip
pip install swarmauri_xmp_png
# uv
uv add swarmauri_xmp_png
Usage
from pathlib import Path
from swarmauri_xmp_png import PNGXMP
handler = PNGXMP()
image_path = Path("example.png")
xmp_packet = """<x:xmpmeta xmlns:x='adobe:ns:meta/'><rdf:RDF>...</rdf:RDF></x:xmpmeta>"""
# Embed an XMP packet
updated_bytes = handler.write_xmp(image_path.read_bytes(), xmp_packet)
image_path.write_bytes(updated_bytes)
# Verify the packet can be recovered
restored_xml = handler.read_xmp(updated_bytes)
print(restored_xml)
# Remove XMP if necessary
clean_bytes = handler.remove_xmp(updated_bytes)
Why it works
- Dynamic discovery – the handler is automatically registered with
DynamicBaseconsumers via inheritance. - Standards alignment – PNG metadata lives in an iTXt chunk per ISO 16684 guidance.
- Predictable behavior – read/write/remove flows mirror each other so pipelines remain idempotent.
Project Resources
- Source: https://github.com/swarmauri/swarmauri-sdk
- License: Apache 2.0
Metadata
Release files for swarmauri_xmp_png 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| swarmauri_xmp_png-0.1.1.tar.gz | 3.4 kB | Without provenance | Details for swarmauri_xmp_png-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| swarmauri_xmp_png-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for swarmauri_xmp_png-0.1.1-py3-none-any.whl |
Total release size: 7.6 kB
Release files / swarmauri_xmp_png-0.1.1.tar.gz
| Download URL | swarmauri_xmp_png-0.1.1.tar.gz |
|---|---|
| Size | 3.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
37c011db5445efce8929bf62f8f40363aa5184a4b0021d8013f231d06b95ca9b
|
|
BLAKE2b-256 checksum How to use checksums |
075a60d8b0618a51114389655600c52fa227c277d494c792e32a7960415eeb75
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.0 {"installer":{"name":"uv","version":"0.11.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / swarmauri_xmp_png-0.1.1-py3-none-any.whl
| Download URL | swarmauri_xmp_png-0.1.1-py3-none-any.whl |
|---|---|
| Size | 4.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8bc33bec8e074f4869476dbf19f33263b587a0d72e7886ffe1903a1c32f2a159
|
|
BLAKE2b-256 checksum How to use checksums |
169bdb4df1bcfd40b471684022a060280077abfd13e5855e359453812568fdb6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.0 {"installer":{"name":"uv","version":"0.11.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for swarmauri_xmp_png 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.