Serdataclasses

Latest version: v0.8.0

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

Scan your dependencies

Page 1 of 2

0.8.0

Major changes in this release!

Added

- (potential breaking change) add OptionalProperty, UNDEFINED, and Undefined for missing properties. If your code currently relies on `None` being generated by `typing.Optional` on missing properties, read the function signature of `load` and `dump`.

Changed

- Error messages are generally much better
- Better-handle custom exceptions being raised in dataclasses. Useful to elegantly hande validation checks in `__post_init__`

Fixed

- Type improvements for NoResult

0.7.0

Added

- Support for automatic conversion of primitive types (`str`, `int`, `float`, `bool`). Stops the conversion when hitting all non-`Option` `Union` types.

0.6.1

Fixed

- `object` types were incorrectly specified, they have been changed to `Any`.
- Update pylint and mypy for local debugging purposes

0.6.0

Added

- Support default arguments for `NamedTuples` and `dataclasses`. Behavior: if default argument exists, if no argument is present in the unstructure Python object, and if there is a default value for the argument, we use the default argument instead of `None` (which is automatically returned by `dict.get`).

0.5.1

There are no functional changes here, just some book-keeping CI / local dev-related stuff.

Added

- Set up continuous integration using GitHub Actions.

Fixed

- Some development dependencies weren't in pyproject.toml.

0.5.0

Added

- `load` now supports `tuple` types
- `dump` now supports Sequence/Mapping, not just list/dict

Page 1 of 2

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.