Dataclass-mapper

Latest version: v1.9.3

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

Scan your dependencies

Page 1 of 4

2.0.0a1

Changes:
- Simple Types: extract a single value from a dataclass / create a dataclass from a single value

2.0.0a0

Alpha release.
The release is not backwards compatible with version v1.9.x.

Documentation: https://dataclass-mapper.readthedocs.io/en/latest/

A detailed upgrade guide and list of all new features will follow for the release.
Overview over all changes:

- Major rewrite (generate AST instead of code as string, major refactorings)
- Feature: Updating models
- Feature: Support for SQLAlchemy models
- Feature: Init parameter for dataclasses
- Breaking change: handling of optional source fields
- Breaking change: extra context
- Improvement: additional types and mappings for complicated fields

1.9.3

Technical improvement: documentation build

The https://readthedocs.org build changed a bit, so the old documentation didn't build anymore because of the theme.

1.9.2

Documentation: Support for Python 3.12

Python 3.12 is already supported for a long time, however Pypi doesn't show the 3.12 flag, since `poetry` didn't add the `Programming Language :: Python :: 3.12` classifier automatically.
This release should fix this behavior.

1.9.1

Documentation: Support for Python 3.12

No change in any features or behaviors of the library.
Only the documentation and CI pipeline have been updated for the new Python version.

1.9.0

Feature: Recursive mappings with dictionary values

It is now possible to map a field of type `Dict[T, Foo]` to `Dict[T, Bar]`, if there is a mapping defined between `Foo` and `Bar`.

python
dataclass
class Bar:
...

mapper(Bar)
dataclass
class Foo:
...

dataclass
class BarDict:
d: Dict[str, Bar]

mapper(BarDict)
dataclass
class FooDict:
d: Dict[str, Foo]

Page 1 of 4

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.