{"id":22351,"library":"sentry-kafka-schemas","title":"Sentry Kafka Schemas","description":"Provides Kafka topic definitions, Avro/Protobuf schemas, and versioned schema management for Sentry's event ingestion and processing pipelines. Version 2.1.29 is actively maintained with frequent releases (multiple per month).","status":"active","version":"2.1.29","language":"python","source_language":"en","source_url":"https://github.com/getsentry/sentry-kafka-schemas","tags":["kafka","schemas","sentry","avro","protobuf"],"install":[{"cmd":"pip install sentry-kafka-schemas","lang":"bash","label":"Install from PyPI"}],"dependencies":[],"imports":[{"note":"get_topic is top-level, not nested in schema module.","wrong":"from sentry_kafka_schemas.schema import get_topic","symbol":"get_topic","correct":"from sentry_kafka_schemas import get_topic"},{"note":"get_message_type is exported from the package root.","wrong":"from sentry_kafka_schemas.types import get_message_type","symbol":"get_message_type","correct":"from sentry_kafka_schemas import get_message_type"}],"quickstart":{"code":"from sentry_kafka_schemas import get_topic, get_message_type, get_schema\n\ntopic_name = \"events\"\ntopic = get_topic(topic_name)\nprint(topic.version)\n\nmsg_type = get_message_type(topic_name)\nprint(msg_type)\n\nschema = get_schema(topic_name)\nprint(schema.schema_str[:100])\n","lang":"python","description":"Get topic metadata, message type, and schema for a given topic."},"warnings":[{"fix":"Replace `get_topic_with_version(name, version)` with `get_topic(name, version=version)`.","message":"Version 2.0 removed the old `get_topic_with_version` function and changed how topic versions are specified. Use `get_topic(topic_name, version=...)` instead.","severity":"breaking","affected_versions":">=2.0"},{"fix":"Use `get_schema(topic_name, version='2.0')` or similar.","message":"Calling `get_schema` without a version argument will be deprecated. Always pass an explicit version to avoid defaulting to the latest.","severity":"deprecated","affected_versions":">=1.5"},{"fix":"Ensure the package is installed normally (not in editable mode) or install with `--no-use-pep517`.","message":"The package uses `importlib.resources` internally, which may raise `FileNotFoundError` if the package is installed incorrectly (e.g., via `pip install -e` without proper metadata).","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Install via `pip install sentry-kafka-schemas` and use `import sentry_kafka_schemas` (underscore).","cause":"Package not installed or installed as a different name (e.g., `sentry-kafka-schemas` vs `sentry_kafka_schemas`).","error":"ModuleNotFoundError: No module named 'sentry_kafka_schemas'"},{"fix":"Check the list of valid topics: `from sentry_kafka_schemas import TOPICS; print(TOPICS.keys())`","cause":"The topic name does not exist in the schemas registry.","error":"sentry_kafka_schemas.exceptions.TopicNotFoundError: Topic 'some_topic' not found"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}