Lima

Latest version: v0.5

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

Scan your dependencies

Page 1 of 2

0.6

================

.. note::

While unreleased, the changelog of lima 0.6 is itself subject to change.

0.5

================

- Support getting field values from an object's items by providing the ``key``
argument to a Field constructor.

- Add a ``fields.Decimal`` field type that packs ``decimal.Decimal`` values
into strings.

- Move Tests into directory ``/test``.

- Remove deprecated field ``fields.Nested``. Use ``fields.Embed`` instead.

0.4

================

- **Breaking Change:** The ``Schema.dump`` method no longer supports the
``many`` argument. This makes ``many`` consistent with ``ordered`` and
simplifies internals.

- Improve support for serializing linked data:

- Add new field type ``fields.Reference`` for references to linked objects.

- Add new name for ``fields.Nested``: ``fields.Embed``. Deprecate
``fields.Nested`` in favour of ``fields.Embed``.

- Add read-only properties ``many`` and ``ordered`` for schema objects.

- Don't generate docs for internal modules any more - those did clutter up the
documentation of the actual API (the docstrings remain though).

- Implement lazy evaluation and caching of some attributes (affects methods:
``Schema.dump``, ``Embed.pack`` and ``Reference.pack``). This means stuff is
only evaluated if and when really needed, but it also means:

- The very first time data is dumped/packed by a Schema/Embed/Reference
object, there will be a tiny delay. Keep objects around to mitigate this
effect.

- Some errors might surface at a later time. lima mentions this when
raising exceptions though.

- Allow quotes in field names.

- Small speed improvement when serializing collections.

- Remove deprecated name ``fields.type_mapping``. Use ``fields.TYPE_MAPPING``
instead.

- Overall cleanup, improvements and bug fixes.

0.3.1

==================

- Fix inconsistency in changelog.

0.3

================

- Support dumping of ``OrderedDict`` objects by providing ``ordered=True`` to
a Schema constructor.

- Implement field name mangling: ``at__foo`` becomes ``foo`` for fields
specified as class attributes.

- Support constant field values by providing ``val`` to a Field constructor.

- Add new ways to specify a schema's fields:

- Add support for ``__lima_args__['only']`` on schema definition

- Add *include* parameter to Schema constructor

This makes specifying fields on schema definition (``__lima_args__`` -
options *include*, *exclude*, *only*) consistent with specifying fields on
schema instantiation (schema constructor args *include*, *exclude*, *only*).

- Deprecate ``fields.type_mapping`` in favour of ``fields.TYPE_MAPPING``.

- Improve the documentation.

- Overall cleanup, improvements and bug fixes.

0.2.2

==================

- Fix issue with package not uploading to PYPI

- Fix tiny issues with illustration

Page 1 of 2

Links

Releases

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.