Odin

Latest version: v2.10

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

Scan your dependencies

Page 1 of 6

2.10

====

Changes
-------

- Remove simplejson as a fallback. Is no longer required with Python 3.8 plus and
has worse performance that the builtin json module.

- Simplify the internals of the Resource metaclass to make it easier to understand
and maintain. Greater sharing of code between Resource and AnnotatedResource

This change has not effect on the public API.

Removes some compatibility code with versions prior to Python 3.8.

- Support shadowing of fields on a resource. To enabled this feature set the
``allow_field_shadowing`` meta option to ``True``. This allows for fields to be
overridden on a resource.

ResourceObjects now includes a shadow_fields listing all fields shadowed by this
resource.


Bugfix
------

- ResourceOptions.abstract flag was not being set for abstract AnnotatedResrouces.

2.9

===

Changes
-------

- Add support for delayed resolution of types for composite fields. This
allows for tree structures to be defined.

Use ``DictAs.delayed(lambda: CurrentResource)`` to define a composite field that
uses the current resource as the type for the dict.

2.8.1

=====

Changes
-------

- Add beta contrib package for generating a JSON Schema from an Odin resource.

2.8

===

Changes
-------

- Change behaviour of create_resource_from_dict to not raise Validation errors
from ``field.to_python`` when ``full_clean`` is ``False``.

Allows for invalid documents to still be loaded with invalid data to allow
for correction of data and to prevent data loss.

- Introduce Pre-commit, PyUpgrade, isort, ruff and black.

2.7

===

Bug fixes
---------

- TypedDictField now includes a prepare method to ensure types are cast correctly for serailisation.

2.6

===

- Redesign of TraversalPath to make it more useful. Provides more information about the path to allow
it to be used in more ways that just for fetching a value from a document.

Page 1 of 6

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.