skillfed

adaptix

An extremely flexible and configurable data model conversion library

adaptix v3.0.0b12 141.9K downloads/30d#11,232 on PyPI612
Permissive license Apache-2.0 Active released

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 adaptix

uv

uv add adaptix

poetry

poetry add adaptix

Installing 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

Development Status :: 3 - AlphaIntended Audience :: DevelopersIntended Audience :: Information TechnologyIntended Audience :: System AdministratorsLicense :: OSI Approved :: Apache Software LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: InternetTopic :: Software Development :: Libraries :: Python ModulesTyping :: Typed

Tags

data model conversion librarydict to dataclass loaderJSON serialization deserializationmodel validation transformationDTO conversion between modelsflexible data parsingschema-less data mapping
data-serializationtype-conversionvalidation

More Python Modules packages