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, schema_id)

Insert a schema into the cache.

Methods Documentation

insert(schema, schema_id)#

Insert a schema into the cache.

Parameters:
  • schema (dict) – An Avro schema.

  • schema_id (int) – ID of the schema in a Schema Registry.

Return type:

None