avro-validator
Pure python avro schema validator
What it is and what it does
Avro Validator is a pure-Python library for validating data against Avro schemas. Unlike the default Avro library for Python, which returns only a generic 'datum is not an example of the schema' error, this package pinpoints exactly which field failed validation and why—making it much easier to debug data compliance issues in larger schemas.
The library works both as a command-line tool and as a Python library. You can load a schema from a file or pass it as a JSON string, then call validate() on your data. If validation passes, it returns True; if it fails, it raises a ValueError with a detailed message showing the field path, the invalid value, and the type mismatch. Schema parsing itself also validates against Avro specifications and reports clear errors for malformed schemas.
Use it for:
- Debug data validation failures in data pipelines by identifying exactly which field and value caused the schema mismatch.
- Validate incoming JSON or dict data against Avro schemas before writing to a data lake or message queue.
- Develop Avro schema definitions interactively, catching schema syntax errors early with detailed parse-time messages.
- Batch-validate files from the command line using the avro_validator CLI tool without writing Python code.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Validates Python data against Avro schemas and reports detailed, field-level error messages instead of generic validation failures.
Yes, if you work with Avro schemas and need better error messages than the standard library provides. The package is lightweight, has no dependencies, and is permissively licensed. However, note that maintenance is dormant (last release 2022-07-26); if you need active support or encounter bugs with newer Avro features, consider whether the project's age is acceptable for your use case.
Install
avro-validator on PyPI
pip
pip install avro-validatoruv
uv add avro-validatorpoetry
poetry add avro-validatorInstalling avro-validator
Before you install
Low install friction with no runtime dependencies. Maintenance is dormant—last release was 2022-07-26, though the repository remains active and the package supports current Python versions (>=3.6).
License in practice
MIT license (permissive) allows commercial and private use with minimal restrictions.
Quickstart
from avro_validator.schema import Schema
import json
schema = Schema(json.dumps({
'name': 'test',
'type': 'record',
'fields': [{'name': 'id', 'type': 'int'}]
}))
parsed = schema.parse()
parsed.validate({'id': 123}) # Returns True if valid
Requires Python 3.6 or later.
Verify before relying
- Whether the package handles nested Avro types (unions, arrays, maps) with the same level of error detail.
- Performance characteristics when validating large or deeply nested schemas.
- Active maintenance status and responsiveness to bug reports given dormant release cycle.
Package facts
| License | not declared (permissive) |
| Python support | supports the current Python release (>=3.6) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | dormant — 1,480 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 81,587/month — #14,215 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: avro_validator-1.2.1-py3-none-any.whl
Keywords: avro, schema
Tags
More Quality Assurance packages
Coverage.py measures which lines of Python code…
permissive · top 1,000 on PyPI
ruffRuff is a Python linter and code formatter…
permissive · top 1,000 on PyPI
pexpectPexpect spawns and controls interactive console…
permissive · top 1,000 on PyPI
blackBlack reformats Python source code to a…
permissive · top 1,000 on PyPI
pytest-xdistpytest-xdist distributes pytest tests across…
permissive · top 1,000 on PyPI
cfn-lintValidates AWS CloudFormation templates in YAML…
permissive · top 1,000 on PyPI
schemaValidates Python data structures (dicts, lists,…
permissive · top 1,000 on PyPI
avro-gen3Generates typed Python record classes and a…
permissive · top 5,000 on PyPI
yamaleYamale validates YAML files against a schema…
permissive · top 5,000 on PyPI
avro-genGenerates typed Python record classes and a…
permissive · top 15,000 on PyPI
pydantic-avroConverts between pydantic class definitions and…
permissive · top 5,000 on PyPI
swagger-spec-validatorValidates Swagger/OpenAPI specifications…
permissive · top 15,000 on PyPI
kcidb-iokcidb-io validates and manipulates Linux Kernel…
copyleft · top 15,000 on PyPI
py-avro-schemaGenerates Apache Avro schemas from Python…
permissive · top 15,000 on PyPI
zcborzcbor validates and converts YAML/JSON/CBOR…
permissive · top 15,000 on PyPI
voluptuousVoluptuous validates Python data structures…
permissive · top 5,000 on PyPI