SchemaCache

class kafkit.registry.sansio.SchemaCache

Bases: object

A cache of schemas that maintains a mapping of schemas and their IDs in a Schema Registry.

Notes

Use key access to obtain the schema either by ID, or by the value of the schema itself.

Methods Summary

insert(schema, Any], schema_id) Insert a schema into the cache.

Methods Documentation

insert(schema: Mapping[str, Any], schema_id: int) → None

Insert a schema into the cache.

Parameters:
  • schema (dict) – An Avro schema.
  • schema_id (int) – ID of the schema in a Schema Registry.