trafaret
Validation and parsing library
Decision gist · record as of 2026-08-14
Yes, if you need a lightweight, dependency-free validation library and can accept that the package is no longer maintained. The API is stable and works well for straightforward schema validation tasks. No, if you require active maintenance, security updates, or support for the latest Python versions—consider an actively maintained alternative like Pydantic or Marshmallow instead.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Low install friction with no runtime dependencies.
- However, the package is abandoned—last release was 2022-04-01 and no commits since then.
- Use only if you accept the risk of no future maintenance or security updates.
License · maintenance · safety
BSD (permissive) — BSD license is permissive; you can use, modify, and distribute this package freely in commercial and open-source projects with minimal restrictions.
last release 2022-04-01 (1596 days) · last repo commit 2022-04-01 · 174 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 964,396 downloads/mo, #4,625 on PyPI
Alternatives
Verify before relying
pip install trafaret
import trafaret as t
validator = t.Dict(a=t.Int, b=t.List(t.String))
result = validator.check({'a': 5, 'b': ['lorem', 'ipsum']})- Whether the package works reliably with modern Python versions (requires_python is unspecified in the fact sheet)
- Whether async_check and aiohttp support mentioned in the description are fully functional in version 2.1.1
What it is and what it does
Trafaret is a validation and data transformation library that lets you define schemas to check and convert incoming data—configs, JSON, form submissions, or any structured input. You write a schema once (using a shorthand syntax or composable validator objects), then call it to validate and transform data; if the data doesn't match, you get detailed error messages showing exactly what failed and where.
The library supports custom error messages, context passing during validation, and async checking via async_check. It has no runtime dependencies, making it lightweight to add to a project. However, the package has been abandoned since April 2022 with no recent commits, so it receives no maintenance or security updates.
Use it for
- Validate JSON payloads in web APIs before processing, catching malformed or missing fields early
- Check and transform configuration files (YAML, JSON, TOML) at startup to ensure required keys and correct types
- Validate and normalize form submissions in web applications, converting string inputs to the correct types
- Build data pipelines that require strict schema enforcement, transforming data as it flows through stages
- Parse and validate user input in CLI tools, ensuring arguments and options meet expected formats
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need a lightweight, dependency-free validation library and can accept that the package is no longer maintained.
The API is stable and works well for straightforward schema validation tasks. No, if you require active maintenance, security updates, or support for the latest Python versions—consider an actively maintained alternative like Pydantic or Marshmallow instead.
Install
trafaret on PyPI
Before you install
Low install friction with no runtime dependencies. However, the package is abandoned—last release was 2022-04-01 and no commits since then. Use only if you accept the risk of no future maintenance or security updates.
License in practice
BSD license is permissive; you can use, modify, and distribute this package freely in commercial and open-source projects with minimal restrictions.
Quickstart
pip install trafaret
import trafaret as t
validator = t.Dict(a=t.Int, b=t.List(t.String))
result = validator.check({'a': 5, 'b': ['lorem', 'ipsum']})
Verify before relying
- Whether the package works reliably with modern Python versions (requires_python is unspecified in the fact sheet)
- Whether async_check and aiohttp support mentioned in the description are fully functional in version 2.1.1
Package facts
| License | BSD permissive |
| Python support | Not specified |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Abandoned 1,596 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 964,396 / month, #4,625 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Intended Audience :: DevelopersLicense :: OSI Approved :: BSD LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3 |
Evidence: trafaret-2.1.1-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 › “data validation library”
- trafaretTrafaret validates and transforms foreign data (JSON, configs, user…
- pydantic_corepydantic-core provides the high-performance validation and…
- voluptuousVoluptuous validates Python data structures (dictionaries, lists,…
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 schema · jsonschema-pydantic · fastjsonschema · schematics · yamale · jsoncompat · eido · snaptime · asdf-transform-schemas · transliterate