Odin

Latest version: v2.10

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

Scan your dependencies

Page 2 of 6

2.5

===

- Add ValidationErrorCollection helper for simplifying collection of errors in custom validation code.
- Change behaviour of to_python method on a CompositeField to not do a full clean.
This is not required as this should be completed during the validation stage.
This prevents double validation and solves the issue of resources not being populated at all if
any contained field contains an error.

2.4

===

- Add contrib.rich to provide pre-built rich integration for rendering ``ValidationErrors`` as a tree
- Improve ValidationError
- Add ``for_field`` class method to simplify creating an exception related to a specific field.
- Improve type annotations
- Improve error handling of Validator rendering in sphinx contrib.
- Improve description of validators for documentation.
- Improve type annotations in validators.
- Updates to documentation
- Add decorators to docs
- Additional docs for validators
- Additional docs for Sphinx extension

2.3.1

=====

Bug fix
-------

- ResourceOptions.composite_fields filtered composite field by Resource instead of ResourceBase.

2.3

===

- Add meta option to specify how to format field names for serialisation. For example
support being able to specify camelCase.
- Updates to documentation
- Add field_name_format meta option to docs
- Document odin.utils

2.2

===

- Fix a bug where annotated resource fields failed to get resolved.
- Fix issues where functools.cached_property does not work on annotated resources as __set_name__
was not being called.
- Updates to documentation
- Introduce integration example for mapping Django models
- Flesh out mapping documentation
- Fix missing link to dict_codec reference.

2.1

===

Annotated Resources
-------------------

- Final fields are now mapped to ConstantField and require a default value.
- Fix issue where the Toml codec did not recognise annotated resources in dump and dumps functions.

Breaking changes
----------------

- Virtual fields ConstantField and CalculatedField now require keyword arguments for options.

Page 2 of 6

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.