py-avro-schema
Generate Apache Avro schemas for Python types including standard library data-classes and Pydantic data models.
Decision gist · record as of 2026-08-14
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.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.9 or later.
- 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 · maintenance · safety
permissive license (permissive) — 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.
last release 2024-09-03 (710 days) · last repo commit 2024-09-03 · 46 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 130,665 downloads/mo, #11,632 on PyPI
Alternatives
Verify before relying
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)- 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.
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 on this page. Verify before relying on it.
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
py-avro-schema on PyPI
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.
Requires Python 3.9 or later.
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)
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 | permissive license permissive |
| Python support | Supports the current Python release >=3.9 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 5 packagesavromemoizationmore-itertoolsorjsontypeguard |
| Maintenance | Dormant 710 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 130,665 / month, #11,632 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableLicense :: OSI Approved :: Apache Software LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3Typing :: Typed |
Evidence: py_avro_schema-3.8.2-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “dataclass to avro schema”
- py-avro-schemaGenerates Apache Avro schemas from Python dataclasses and Pydantic…
- dataclasses-avroschemaGenerates Avro schemas from Python dataclasses, Pydantic models, and…
- datamodel-code-generatorGenerates Python data models (Pydantic, dataclasses, TypedDict,…
Give your agent the search over MCP, or paste the wish link into any chat.
More Software Development packages
Provides backported and experimental type hints for Python 3.9+, allowing use of newer typing features on older Python versions and enabling early experimentation with type system PEPs before they enter the standard library.
NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.
FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.
Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.
Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.
Install it if you are building CLIs in Python.
Distlib provides low-level packaging utilities for building, distributing, and managing Python software—including metadata handling, version specifiers, wheel support, script installation, and dependency resolution.
See also dataclasses-avroschema · pydantic-avro · datamodel-code-generator · safety-schemas · apischema · dataclasses-jsonschema · aws-glue-schema-registry · python-schema-registry-client · avro · avro-python3