Skip to main content

Python serialization library for Apicurio Registry

Project description

apicurio-serdes

CI codecov Quality Gate OpenSSF Scorecard Docs PyPI version Python versions PyPI Downloads License Ruff security: bandit

Python serialization library for Apicurio Registry.

Provides Avro serializers that fetch and cache schemas from an Apicurio Registry v3 instance, with support for both sync and async usage. Two wire formats are supported: the Confluent-compatible payload framing and Apicurio's Kafka-headers mode.

Feature status

Feature Status
Sync registry client (ApicurioRegistryClient) Shipped
Async registry client (AsyncApicurioRegistryClient) Shipped
Avro serializer (AvroSerializer) Shipped
Avro deserializer (AvroDeserializer) Shipped
Confluent wire format (magic byte + globalId) Shipped
Kafka-headers wire format Shipped

Installation

pip install apicurio-serdes

Quick start

Sync client

from apicurio_serdes import ApicurioRegistryClient

client = ApicurioRegistryClient(
    url="http://localhost:8080/apis/registry/v3",
    group_id="com.example.schemas",
)

cached = client.get_schema("UserEvent")
# cached.schema     — parsed Avro schema dict (fastavro-ready)
# cached.global_id  — Apicurio globalId
# cached.content_id — Apicurio contentId

Async client

from apicurio_serdes import AsyncApicurioRegistryClient

client = AsyncApicurioRegistryClient(
    url="http://localhost:8080/apis/registry/v3",
    group_id="com.example.schemas",
)

cached = await client.get_schema("UserEvent")

Wire formats

from apicurio_serdes import WireFormat

# Magic byte (0x00) + 4-byte globalId prefix — Confluent-compatible
WireFormat.CONFLUENT_PAYLOAD

# Raw Avro bytes; schema ID carried in a Kafka message header
WireFormat.KAFKA_HEADERS

Contributing

See CONTRIBUTING.md for dev setup, coding standards, and how to submit a pull request.

License

MIT

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

apicurio_serdes-0.4.0rc2.tar.gz (386.5 kB view details)

Uploaded Source

Built Distribution

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

apicurio_serdes-0.4.0rc2-py3-none-any.whl (29.0 kB view details)

Uploaded Python 3

File details

Details for the file apicurio_serdes-0.4.0rc2.tar.gz.

File metadata

  • Download URL: apicurio_serdes-0.4.0rc2.tar.gz
  • Upload date:
  • Size: 386.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for apicurio_serdes-0.4.0rc2.tar.gz
Algorithm Hash digest
SHA256 fe34b22de769602d18d1110f469c87e43a1f3409fb597e9918e2acc8f18b21d1
MD5 fc29b3d0868a709e398e6d7c42254976
BLAKE2b-256 34d3ed8979d49b778f520a094a9435eb659681a3918153b69dba271819e54a0a

See more details on using hashes here.

Provenance

The following attestation bundles were made for apicurio_serdes-0.4.0rc2.tar.gz:

Publisher: publish.yml on jcbianic/apicurio-serdes

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file apicurio_serdes-0.4.0rc2-py3-none-any.whl.

File metadata

File hashes

Hashes for apicurio_serdes-0.4.0rc2-py3-none-any.whl
Algorithm Hash digest
SHA256 0197e24ff7ea71222689f0e2b31ae02487d707d183841deb6e03e78f7de91648
MD5 c89e064cd9ceedfbbc8c18fd72d6a300
BLAKE2b-256 313e5ed83d2696f5d4ce3b6b87eac5d101a83e5e0526daf28f1b61682248eea0

See more details on using hashes here.

Provenance

The following attestation bundles were made for apicurio_serdes-0.4.0rc2-py3-none-any.whl:

Publisher: publish.yml on jcbianic/apicurio-serdes

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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