Kafkit API reference#
kafkit.registry Package#
Serialization and desierialization of Avro messsages using the Confluent Schema Registry.
Classes#
|
An Avro message deserializer that understands the Confluent Wire Format and obtains schemas on-demand from a Confluent Schema Registry. |
|
A message, along with schema information. |
|
An Avro message serializer that writes in the Confluent Wire Format. |
|
An Avro message serializer that can write messages for multiple schemas in the Confluent Wire Format. |
|
An exception if the request is invalid (4XX errors). |
|
An excpetion if the server is down (5XX errors). |
Base exception for Registry errors. |
|
|
A base exception that includes metadata about the HTTP response. |
|
An exception for 3XX responses. |
An exception for when a schema is not managed by the Registry, and therefore cannot be deserialized into a native Python object. |
kafkit.registry.aiohttp Module#
Aiohttp client for the Confluent Schema Registry.
This code and architecture is based on brettcannon/gidgethub See licenses/gidgethub.txt for info.
Classes#
|
A Confluent Schema Registry client that uses aiohttp. |
kafkit.registry.httpx Module#
Httpx client for the Confluent Schema Registry.
This code and architecture is based on brettcannon/gidgethub See licenses/gidgethub.txt for info.
Classes#
|
A Confluent Schema Registry client that uses httpx. |
kafkit.registry.manager Package#
Schema managers register schemas with the registry and enable conventient serialization and deserialization of messages.
Classes#
|
A manager for schemas embedded in the application itself in conjunction with a Confluent Schema Registry, for the case of a record name subject name strategy. |
|
A manager for schemas that are represented as Pydantic models in Python, and translated into Avro for the Confluent Schema Registry. |
kafkit.registry.sansio Module#
Code to help use the Confluent Schema Registry that is not specific to a particular http client library.
This code and architecture is inspired by brettcannon/gidgethub and https://sans-io.readthedocs.io. See licenses/gidgethub.txt for license info.
Functions#
Make HTTP headers for the Confluent Schema Registry. |
|
|
Process a response. |
|
Decode an HTTP body based on the specified content type. |
Classes#
|
A baseclass for Confluent Schema Registry clients. |
|
A mock implementation of the RegistryApi client that doensn't do network operations and provides attributes for introspection. |
A cache of schemas that maintains a mapping of schemas and their IDs in a Schema Registry. |
|
|
A cache of subjects in a schema registry that maps subject and version tuples to an actual schema. |
|
Compatibility settings available for the Confluent Schema Registry, as an Enum. |
kafkit.ssl Module#
Support for connecting to brokers with SSL.
Functions#
|
Create an SSL context for a client connecting to secured Kafka brokers. |