
Security News
Django Joins curl in Pushing Back on AI Slop Security Reports
Django has updated its security policies to reject AI-generated vulnerability reports that include fabricated or unverifiable content.
An extremely flexible and configurable data model conversion library.
[!IMPORTANT] Adaptix is ready for production! The beta version only means there may be some backward incompatible changes, so you need to pin a specific version.
š Documentation
Install
pip install adaptix==3.0.0b11
Use for model loading and dumping.
from dataclasses import dataclass
from adaptix import Retort
@dataclass
class Book:
title: str
price: int
data = {
"title": "Fahrenheit 451",
"price": 100,
}
# Retort is meant to be global constant or just one-time created
retort = Retort()
book = retort.load(data, Book)
assert book == Book(title="Fahrenheit 451", price=100)
assert retort.dump(book) == data
Use for converting one model to another.
from dataclasses import dataclass
from sqlalchemy.orm import DeclarativeBase, Mapped, mapped_column
from adaptix.conversion import get_converter
class Base(DeclarativeBase):
pass
class Book(Base):
__tablename__ = 'books'
id: Mapped[int] = mapped_column(primary_key=True)
title: Mapped[str]
price: Mapped[int]
@dataclass
class BookDTO:
id: int
title: str
price: int
convert_book_to_dto = get_converter(Book, BookDTO)
assert (
convert_book_to_dto(Book(id=183, title="Fahrenheit 451", price=100))
==
BookDTO(id=183, title="Fahrenheit 451", price=100)
)
@dataclass
, TypedDict
, NamedTuple
,
attrs
, sqlalchemy
,
pydantic
and msgspec
.snake_case
to camelCase
).FAQs
An extremely flexible and configurable data model conversion library
We found that adaptix demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago.Ā It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Django has updated its security policies to reject AI-generated vulnerability reports that include fabricated or unverifiable content.
Security News
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
Security News
A new Node.js homepage button linking to paid support for EOL versions has sparked a heated discussion among contributors and the wider community.