Adaptix

Latest version: v3.0.0b9

Safety actively analyzes 690739 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 5

3.0.0b9

- Add support for all Python 3.13 new features.
- Add [Why not Pydantic?](https://adaptix.readthedocs.io/en/latest/why-not-pydantic.html) article.
- All iterables now are dumped to tuple (or list for list children).

See the full list of changes at [changelog](https://adaptix.readthedocs.io/en/latest/reference/changelog.html#v3-0-0b9).

3.0.0b8

- New providers for working with time: `datetime_by_timestamp`, `date_by_timestamp` and `datetime_by_format`.
- Add `exec_type_checking` function to deal with cyclic references by executing `if TYPE_CHECKING:` constructs.
- Add support for bytes inside literal, for example `Literal[b"abc"]`.
- The library shows a hint if one class is a model and the other is not.
- Traceback of CannotProvide is hidden (it is raised when loader, dumper, or converter can not be created). It simplifies error messages to users. You can show traceback by disabling hide_traceback parameter of Retort.
- Drop support of Python 3.8.
- Refactor internal provider routing system. It becomes more simple and readable. Also, internal caching is added. This led to a 40% speedup in loader generation for medium models and up to 4x speedup for large models with many recursive types.


See the full list of changes at [changelog](https://adaptix.readthedocs.io/en/latest/reference/changelog.html#v3-0-0b8).

3.0.0b7

- Allow redefining coercer inside `Optional` using an inner type if source and destination types are same.
- Fix ForwardRef evaluation inside `__bound__` of `TypeVar` for `Python 3.12.4`.
- `NoSuitableProvider` exception was renamed to `ProviderNotFoundError` (old name is available as alias).

See the full list of changes at [changelog](https://adaptix.readthedocs.io/en/latest/reference/changelog.html#v3-0-0b7).

3.0.0b6

- Now, you can merge several fields or access the model directly via [conversion.link_function](https://adaptix.readthedocs.io/en/latest/reference/api/adaptix.conversion.html#adaptix.conversion.link_function).
See [Link function](https://adaptix.readthedocs.io/en/latest/conversion/extended-usage.html#link-function) for details.

- Add a special column type for serializing and deserializing JSON inside SQLAlchemy.
See [SQLAlchemy JSON](https://adaptix.readthedocs.io/en/latest/reference/integrations.html#sqlalchemy-json) for details.

- Add `Extended Usage` article for model conversion and other documentation updates.

See the full list of changes at [changelog](https://adaptix.readthedocs.io/en/latest/reference/changelog.html#v3-0-0b6).

3.0.0b5

- Add support for Pydantic models!

Now you can work with pydantic models like any other: construct from dict, serialize to dict, convert to any other model, and convert it to any other model.

Also, you can use [integrations.pydantic.native_pydantic](https://adaptix.readthedocs.io/en/latest/reference/api/adaptix.integrations.pydantic.html#adaptix.integrations.pydantic.native_pydantic) to delegate loading and dumping to pydantic itself.

- Add support for dumping ``Literal`` inside ``Union``. [237](https://github.com/reagento/adaptix/issues/237)

- Add support for ``BytesIO`` and ``IO[bytes]``. [270](https://github.com/reagento/adaptix/issues/270)

See the full list of changes at [changelog](https://adaptix.readthedocs.io/en/latest/reference/changelog.html#v3-0-0b5).

3.0.0b4

- Models can be automatically converted inside compound types like Optional, list, dict etc.
- An error of loader, dumper, and converter generation contains a much more readable location
- Add coercer for builtin iterables and dict.

See the full list of changes at [changelog](https://adaptix.readthedocs.io/en/latest/reference/changelog.html#v3-0-0b4).

Page 1 of 5

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.