--- id: py-avro-schema version: "3.8.2" license: Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for… (full text in the JSON record) license_treatment: permissive maintenance: dormant --- # py-avro-schema — Generate Apache Avro schemas for Python types including standard library data-classes and Pydantic data models. License: permissive · Maintenance: dormant · Downloads: 130.7K/mo ## What it is and what it does py-avro-schema bridges Python's type system and Apache Avro by automatically generating Avro schemas from dataclasses and Pydantic models. It takes a Python type definition and produces a schema that can be used for serialization, deserialization, and schema validation in Avro-based systems like Kafka. The package depends on avro, orjson, typeguard, memoization, and more-itertools to handle schema generation, type checking, and performance optimization. The tool is designed for teams using Avro for data interchange who want to define schemas in Python code rather than separately in JSON or Avro IDL. It integrates with both the standard library (dataclasses) and the popular Pydantic validation library, making it useful in data pipelines, message-driven architectures, and systems where Python types need to map cleanly to Avro's type system. Use it for: - Generate Avro schemas from dataclasses for Kafka producers and consumers in Python applications. - Validate Python objects against Avro schemas during serialization and deserialization workflows. - Define data contracts in Python code and automatically export them as Avro schemas for cross-language systems. - Build type-safe data pipelines where Pydantic models are the source of truth for both validation and Avro schema generation. - Integrate schema generation into CI/CD to keep Avro schemas synchronized with Python type definitions. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Generates Apache Avro schemas from Python dataclasses and Pydantic models, enabling serialization and deserialization with type safety. Yes, if you are using Avro in a Python environment and want schemas derived from your type definitions. The package is stable, has no known vulnerabilities, and installs with low friction. However, be aware that maintenance is dormant (710 days since last release); verify compatibility with your specific versions of Avro and Pydantic before committing to production use, and plan for potential maintenance gaps if you need ongoing support. ## Install pip install py-avro-schema uv add py-avro-schema poetry add py-avro-schema ## Installing py-avro-schema Before you install: Low install friction with a pure-Python wheel. Maintenance is dormant—last release was 710 days ago—but the package is marked Production/Stable and carries no known vulnerabilities, suggesting it may be feature-complete rather than abandoned. License in practice: Licensed under Apache License Version 2.0, a permissive open-source license. You may use, modify, and distribute the package freely provided you include the license and document changes; no restrictions on commercial use. Quickstart: pip install py-avro-schema from dataclasses import dataclass from py_avro_schema import avro @dataclass class User: name: str age: int schema = avro(User) Requires Python 3.9 or later. Verify before relying: - Whether dormant maintenance (710 days since last release) affects compatibility with newer Avro or Pydantic versions. - Performance characteristics when generating schemas for deeply nested or very large dataclass hierarchies. - Whether all Pydantic v2 features are supported, given the last release predates widespread v2 adoption. ## Package facts - License: Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for… (full text in the JSON record) (permissive) - Python support: supports_current - Install friction: low - Maintenance: dormant - Downloads: 130.7K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags avro schema generation python, dataclass to avro schema, pydantic avro serialization, python type to avro, kafka schema python, avro serialization dataclass, avro-serialization, schema-generation, dataclass-pydantic [View on SkillFed](https://skillfed.io/packages/py-avro-schema) · [View on PyPI](https://pypi.org/project/py-avro-schema/)