Skip to main content

GIF handler for embedding and extracting XMP packets in Swarmauri runtimes.

Project description

Swarmauri Logo

PyPI - Downloads Hits PyPI - Python Version PyPI - License PyPI - swarmauri_xmp_gif

---

swarmauri_xmp_gif

swarmauri_xmp_gif includes the GIFXMP handler that preserves XMP packets inside GIF89a application extensions using the canonical XMP Data identifier and XMP authentication code.

Features

  • Registry native – extends EmbedXmpBase so managers such as EmbedXMP can discover it through Swarmauri's dynamic registry.
  • Block aware – iterates GIF sub-blocks safely and terminates on sentinel bytes to avoid corrupting animations.
  • Spec aligned – writes uncompressed UTF-8 payloads that match Adobe's guidance for GIF metadata.

Installation

# pip
pip install swarmauri_xmp_gif

# uv
uv add swarmauri_xmp_gif

Usage

from pathlib import Path

from swarmauri_xmp_gif import GIFXMP

handler = GIFXMP()
gif_path = Path("example.gif")
xmp_packet = """<x:xmpmeta xmlns:x='adobe:ns:meta/'><rdf:RDF>...</rdf:RDF></x:xmpmeta>"""

# Embed using an application extension block
updated_bytes = handler.write_xmp(gif_path.read_bytes(), xmp_packet)
gif_path.write_bytes(updated_bytes)

# Retrieve the RDF/XML payload
restored_xml = handler.read_xmp(updated_bytes)
print(restored_xml)

# Remove the extension again
clean_bytes = handler.remove_xmp(updated_bytes)

Why it works

  • Standards-based – uses the XMP-defined App ID and Auth Code from Adobe's reference implementation.
  • Chunk-aware – scans GIF sub-blocks safely, terminating on sentinel bytes and ignoring malformed payloads.
  • Registry-native – inherits from EmbedXmpBase, so managers only need to query the component registry.

Project Resources

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

swarmauri_xmp_gif-0.1.2.dev2.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

swarmauri_xmp_gif-0.1.2.dev2-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file swarmauri_xmp_gif-0.1.2.dev2.tar.gz.

File metadata

  • Download URL: swarmauri_xmp_gif-0.1.2.dev2.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.15 {"installer":{"name":"uv","version":"0.11.15","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}

File hashes

Hashes for swarmauri_xmp_gif-0.1.2.dev2.tar.gz
Algorithm Hash digest
SHA256 6b42f0ed0abbd5fe609ad3ef2053d83dfcaa66ef099b523ce2c6ab8b364798c4
MD5 35160314287d8faecd72aee127e765b9
BLAKE2b-256 7e155c9a63e2f811b282b0ce2d5ddef34faf26db906d675a11c0d0c55410cbf8

See more details on using hashes here.

File details

Details for the file swarmauri_xmp_gif-0.1.2.dev2-py3-none-any.whl.

File metadata

  • Download URL: swarmauri_xmp_gif-0.1.2.dev2-py3-none-any.whl
  • Upload date:
  • Size: 4.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.15 {"installer":{"name":"uv","version":"0.11.15","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}

File hashes

Hashes for swarmauri_xmp_gif-0.1.2.dev2-py3-none-any.whl
Algorithm Hash digest
SHA256 6042956790890e4e42b8a76b37a4680e76ee4280c5b52f8e9d55fb48f27bf439
MD5 45ead3a08472b09c240b1d2942886cee
BLAKE2b-256 be9d0ebd65300045cbfd8e9b75e04c33dd6fc32ce5909df2348afe9ded7e0744

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page