skillfed

avro-validator

Pure python avro schema validator

avro-validator v1.2.1 81.6K downloads/30d#14,215 on PyPI29
Permissive license DORMANT released

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-validator

uv

uv add avro-validator

poetry

poetry add avro-validator

Installing 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

License :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3

Tags

avro schema validationavro data validatordetailed avro validation errorsavro schema compliance checkpython avro validatoravro field validation
avroschema-validationdata-quality

More Quality Assurance packages