Note
While unreleased, the changelog of lima 0.6 is itself subject to change.
- 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 packsdecimal.Decimal
values into strings. - Move Tests into directory
/test
. - Remove deprecated field
fields.Nested
. Usefields.Embed
instead.
Breaking Change: The
Schema.dump
method no longer supports themany
argument. This makesmany
consistent withordered
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
. Deprecatefields.Nested
in favour offields.Embed
.
- Add new field type
Add read-only properties
many
andordered
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
andReference.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
. Usefields.TYPE_MAPPING
instead.Overall cleanup, improvements and bug fixes.
- Fix inconsistency in changelog.
Support dumping of
OrderedDict
objects by providingordered=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).- Add support for
Deprecate
fields.type_mapping
in favour offields.TYPE_MAPPING
.Improve the documentation.
Overall cleanup, improvements and bug fixes.
- Fix issue with package not uploading to PYPI
- Fix tiny issues with illustration
- Fix issues with docs not building on readthedocs.org
- Initial release