{"id":13494587,"url":"https://github.com/reagento/adaptix","last_synced_at":"2026-04-04T19:08:51.671Z","repository":{"id":37493518,"uuid":"147848830","full_name":"reagento/adaptix","owner":"reagento","description":"An extremely flexible and configurable data model conversion library.","archived":false,"fork":false,"pushed_at":"2026-04-04T11:19:11.000Z","size":4229,"stargazers_count":593,"open_issues_count":51,"forks_count":31,"subscribers_count":9,"default_branch":"main","last_synced_at":"2026-04-04T12:10:48.501Z","etag":null,"topics":["conversion","dataclass","dataclasses","deserialization","dicts","generic-dataclasses","json","python","python3","schemas","serialization","type-hints","typehints","typing"],"latest_commit_sha":null,"homepage":"https://adaptix.readthedocs.io","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/reagento.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2018-09-07T16:29:23.000Z","updated_at":"2026-04-03T13:02:19.000Z","dependencies_parsed_at":"2024-01-09T14:52:32.110Z","dependency_job_id":"8b4e1af3-4a45-4f83-81df-2ae5be48d66a","html_url":"https://github.com/reagento/adaptix","commit_stats":{"total_commits":1024,"total_committers":16,"mean_commits":64.0,"dds":0.3896484375,"last_synced_commit":"9f151322cffeb6f26111ea89364f15ef50ac416d"},"previous_names":["reagento/dataclass_factory","tishka17/dataclass_factory","reagento/dataclass-factory"],"tags_count":53,"template":false,"template_full_name":null,"purl":"pkg:github/reagento/adaptix","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reagento%2Fadaptix","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reagento%2Fadaptix/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reagento%2Fadaptix/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reagento%2Fadaptix/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/reagento","download_url":"https://codeload.github.com/reagento/adaptix/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reagento%2Fadaptix/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31409471,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T10:20:44.708Z","status":"ssl_error","status_checked_at":"2026-04-04T10:20:06.846Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["conversion","dataclass","dataclasses","deserialization","dicts","generic-dataclasses","json","python","python3","schemas","serialization","type-hints","typehints","typing"],"created_at":"2024-07-31T19:01:26.311Z","updated_at":"2026-04-04T19:08:51.666Z","avatar_url":"https://github.com/reagento.png","language":"Python","readme":"\u003cdiv align=\"center\"\u003e\n  \u003cpicture\u003e\n    \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://github.com/reagento/adaptix/blob/v3.0.0b6/docs/logo/adaptix-with-title-dark.png?raw=true\"\u003e\n    \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"https://github.com/reagento/adaptix/blob/v3.0.0b6/docs/logo/adaptix-with-title-light.png?raw=true\"\u003e\n    \u003cimg alt=\"adaptix logo\" src=\"https://raw.githubusercontent.com/reagento/adaptix/v3.0.0b2/docs/logo/adaptix-with-title-light.png?raw=true\"\u003e\n  \u003c/picture\u003e\n\n  \u003chr\u003e\n\n  [![PyPI version](https://img.shields.io/pypi/v/adaptix.svg?color=blue)](https://pypi.org/project/adaptix/)\n  [![downloads](https://img.shields.io/pypi/dm/adaptix.svg)](https://pypistats.org/packages/adaptix)\n  [![versions](https://img.shields.io/pypi/pyversions/adaptix.svg)](https://github.com/reagento/adaptix)\n  [![license](https://img.shields.io/github/license/reagento/dataclass_factory.svg)](https://github.com/reagento/adaptix/blob/master/LICENSE)\n\u003c/div\u003e\n\nAn extremely flexible and configurable data model conversion library.\n\n\u003e [!IMPORTANT]\n\u003e Adaptix is ready for production!\n\u003e The beta version only means there may be some backward incompatible changes, so you need to pin a specific version.\n\n📚 [Documentation](https://adaptix.readthedocs.io/)\n\n## TL;DR\n\nInstall\n```bash\npip install adaptix==3.0.0b12\n```\n\nUse for model loading and dumping.\n\n```python\nfrom dataclasses import dataclass\n\nfrom adaptix import Retort\n\n\n@dataclass\nclass Book:\n    title: str\n    price: int\n\n\ndata = {\n    \"title\": \"Fahrenheit 451\",\n    \"price\": 100,\n}\n\n# Retort is meant to be global constant or just one-time created\nretort = Retort()\n\nbook = retort.load(data, Book)\nassert book == Book(title=\"Fahrenheit 451\", price=100)\nassert retort.dump(book) == data\n```\n\nUse for converting one model to another.\n\n```python\nfrom dataclasses import dataclass\n\nfrom sqlalchemy.orm import DeclarativeBase, Mapped, mapped_column\n\nfrom adaptix.conversion import get_converter\n\n\nclass Base(DeclarativeBase):\n    pass\n\n\nclass Book(Base):\n    __tablename__ = 'books'\n\n    id: Mapped[int] = mapped_column(primary_key=True)\n    title: Mapped[str]\n    price: Mapped[int]\n\n\n@dataclass\nclass BookDTO:\n    id: int\n    title: str\n    price: int\n\n\nconvert_book_to_dto = get_converter(Book, BookDTO)\n\nassert (\n    convert_book_to_dto(Book(id=183, title=\"Fahrenheit 451\", price=100))\n    ==\n    BookDTO(id=183, title=\"Fahrenheit 451\", price=100)\n)\n```\n\n## Use cases\n\n* Validation and transformation of received data for your API.\n* Conversion between data models and DTOs.\n* Config loading/dumping via codec that produces/takes dict.\n* Storing JSON in a database and representing it as a model inside the application code.\n* Creating API clients that convert a model to JSON sending to the server.\n* Persisting entities at cache storage.\n* Implementing fast and primitive ORM.\n\n## Advantages\n\n* Sane defaults for JSON processing, no configuration is needed for simple cases.\n* Separated model definition and rules of conversion\n  that allow preserving [SRP](https://blog.cleancoder.com/uncle-bob/2014/05/08/SingleReponsibilityPrinciple.html)\n  and have different representations for one model.\n* Speed. It is one of the fastest data parsing and serialization libraries.\n* There is no forced model representation, adaptix can adjust to your needs.\n* Support [dozens](https://adaptix.readthedocs.io/en/latest/loading-and-dumping/specific-types-behavior.html) of types,\n  including different model kinds:\n  ``@dataclass``, ``TypedDict``, ``NamedTuple``,\n  [``attrs``](https://www.attrs.org/en/stable/), [``sqlalchemy``](https://docs.sqlalchemy.org/en/20/),\n  [``pydantic``](https://docs.pydantic.dev/latest/) and [``msgspec``](https://jcristharif.com/msgspec/).\n* Working with self-referenced data types (such as linked lists or trees).\n* Saving [path](https://adaptix.readthedocs.io/en/latest/loading-and-dumping/tutorial.html#error-handling)\n  where an exception is raised (including unexpected errors).\n* Machine-readable [errors](https://adaptix.readthedocs.io/en/latest/loading-and-dumping/tutorial.html#error-handling)\n  that could be dumped.\n* Support for user-defined generic models.\n* Automatic name style conversion (e.g. `snake_case` to `camelCase`).\n* [Predicate system](https://adaptix.readthedocs.io/en/latest/loading-and-dumping/tutorial.html#predicate-system)\n  that allows to concisely and precisely override some behavior.\n* Disabling additional checks to speed up data loading from trusted sources.\n* No auto casting by default. The loader does not try to guess value from plenty of input formats.\n","funding_links":[],"categories":["Python"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freagento%2Fadaptix","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freagento%2Fadaptix","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freagento%2Fadaptix/lists"}