adaptix
An extremely flexible and configurable data model conversion library
What it is and what it does
Adaptix is a data model conversion library that transforms dictionaries and JSON into typed Python objects (dataclasses, TypedDict, attrs, SQLAlchemy, Pydantic, msgspec) and back again. It separates model definition from conversion rules, allowing the same model to have different representations without coupling. The library handles dozens of types, supports self-referential structures, provides machine-readable error messages with paths, and offers a predicate system for fine-grained control over conversion behavior.
You create a Retort instance (typically once, as a global or module constant) and call load() to parse incoming data or dump() to serialize objects. It works with no configuration for simple cases but allows extensive customization through predicates and codec options. The library does not auto-cast by default, requiring explicit type matches, which reduces silent errors in data validation pipelines.
Use it for:
- Validate and transform received data in REST APIs before passing to business logic.
- Convert between SQLAlchemy ORM models and data transfer objects (DTOs) for API responses.
- Load configuration files (YAML, JSON) into typed dataclass or attrs objects with validation.
- Parse JSON stored in a database and represent it as a strongly-typed model in application code.
- Build API clients that convert local models to JSON for transmission to remote servers.
- Implement a lightweight ORM or object-to-cache mapping for persistence layers.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Adaptix converts between data models, dictionaries, and JSON with flexible, configurable rules—loading dicts into dataclasses, TypedDict, attrs, SQLAlchemy, Pydantic, or msgspec objects, and dumping them back.
Yes, with version pinning. Adaptix is actively maintained, has low install friction, and solves a real problem in data-heavy applications. The Apache-2.0 license is permissive. The beta status (3.0.0b12) means you must pin the version to avoid breaking changes, but the maintainers explicitly state it is production-ready. Install it if you need flexible, configurable model conversion without the overhead of larger frameworks.
Install
adaptix on PyPI
pip
pip install adaptixuv
uv add adaptixpoetry
poetry add adaptixInstalling adaptix
Before you install
Low friction: pure Python wheel with only one runtime dependency (exceptiongroup). Actively maintained with a recent commit on 2026-07-12 and 612 repository stars. Still in beta (3.0.0b12) but documented as production-ready; version pinning is recommended due to potential backward-incompatible changes.
License in practice
Licensed under Apache-2.0 (permissive), allowing free use, modification, and distribution in both open-source and proprietary projects with minimal restrictions.
Quickstart
pip install adaptix==3.0.0b12
from dataclasses import dataclass
from adaptix import Retort
@dataclass
class Book:
title: str
price: int
retort = Retort()
book = retort.load({"title": "Fahrenheit 451", "price": 100}, Book)
data = retort.dump(book)
Requires Python 3.10 or later; CPython and PyPy are both supported.
Verify before relying
- Actual performance comparison with other data conversion libraries (description claims 'one of the fastest' but provides no benchmarks).
- Scope and maturity of support for the listed model types (attrs, SQLAlchemy, Pydantic, msgspec) under beta versioning.
- Backward compatibility guarantees or migration path between beta releases.
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — exceptiongroup |
| Maintenance | actively maintained — 132 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 141,864/month — #11,232 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: adaptix-3.0.0b12-py3-none-any.whl
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
dataclass-factoryConverts dataclasses to and from dictionaries…
permissive · top 15,000 on PyPI
itemadapterItemAdapter wraps data container objects…
permissive · top 5,000 on PyPI
dataclass-wizardDataclass Wizard converts Python dataclasses to…
permissive · top 5,000 on PyPI
typed-json-dataclassAdds JSON serialization and type validation to…
permissive · top 15,000 on PyPI
datamodel-code-generatorGenerates Python data models (Pydantic,…
permissive · top 5,000 on PyPI
databindDatabind deserializes JSON-like nested data…
permissive · top 15,000 on PyPI
sqlalchemy-serializerAdds a `.to_dict()` method to SQLAlchemy model…
permissive · top 15,000 on PyPI
cattrsConverts unstructured dictionaries into…
permissive · top 1,000 on PyPI
daciteConverts dictionaries into dataclass instances…
permissive · top 1,000 on PyPI
databind.jsonDeserializes and serializes Python dataclasses…
permissive · top 15,000 on PyPI