Skip to content

Releases: loyada/typedpy

minor improvement to protect developers

08 Mar 22:10
Compare
Choose a tag to compare

Performance improvement for trusted data

06 Feb 02:36
Compare
Choose a tag to compare

#240 Add a factory method(s) that assumes everything is valid and skips validation
#241 Add an option for deserialization from a "trusted source" for simple structures

Both of these improve performance by a factor of 10-25, depending on the Structure.
Examples from the tests:

Instantiation:

test_trusted_instantiation.py::test_trusted_instantiation_different_style

============================== 1 passed in 0.97s ===============================

Process finished with exit code 0
PASSED [100%]validated policies took: 0.8857707977294922
fast policies took: 0.03746604919433594
ratio: 23.641958967571146

Deserialization:

test_trusted_deserialization.py::test_trusted_deserialization_equivalent_to_regular

============================== 1 passed in 2.71s ===============================

Process finished with exit code 0
PASSED [100%]trusted serialization took: 0.10970401763916016
untrusted serialization took: 1.637939691543579
ratio: 14.930535150782818

Serialization optimization

12 Jan 04:25
Compare
Choose a tag to compare

Taking a performance test, that includes serializing deeply nested structures with lists, we have the following result:
Typedpy 2.19 serialization : 4.6 seconds
Typedpy 2.20 serialization: 3.1 seconds
Typedpy 2.20 "fast" serialization: 0.76 seconds

python stubs generation - static typing support in IDE

21 Jun 14:24
Compare
Choose a tag to compare

This is a major update.
it adds support for static typing, which was a major ommission in the typedpy set of features. This means that developers now get intellisense and type checking in Pycharm or VSC.
This is achieved by automatic generation of python stub files (*.pyi). See more detail in the docs.

Re-use improvements and defect fixes

04 Feb 04:46
Compare
Choose a tag to compare

Main improvements:

Significant improvements in Structure API

Serialization

  • Update code-Schema mapping to be up-to-date with recent features and serialization mappers
  • Support for "Constant" in serialization mappers
  • HasTypes mixin for a base class with multiple types

Other

Many defect fixes and small improvements to API's.

Better integration with Python (non-Typedpy) types

06 Sep 17:47
Compare
Choose a tag to compare

Major improvements:
issue #99 - better support for python field types. See [documentation] (https://typedpy.readthedocs.io/en/latest/fields.html#combining-python-and-typedpy-types-in-field-definition)

Minor improvements:
issue #93 - In a Versioned structure, assign version based on the number of mappers in _versions_mapper

Defects:
issue #95 - deserializer with camel_case_convert option requires _additionalProperties
Issue #96 - Serializing Optional SerializableField does not invoke serialize()
Issue #97 - Error deserializing versioned structures
Issue #98 - AnyOf[NoneField, SerializableField] does not serialize correctly

minor defects

11 Aug 03:43
Compare
Choose a tag to compare

#91 defect: _required on inherited values does not work
#92 defect: classreference must not be allowed to be passed as None

Improvements to serialization/deserialization

05 Aug 02:05
Compare
Choose a tag to compare

#82 serialize field does not resolve field from a super class
#83 support deserializer by a discriminator field
#84 defaults should be assigned to the structure
#85 annotation form does not work with "from future import annotations"
#86 serialization mapper inheritance does not work correctly.
#88 support aggregation of multiple mappers in a single class
#89 Versions mapping
#90 Support deserialization of older versions to latest

grouping updates since 2.3

07 Jun 04:54
Compare
Choose a tag to compare

cleanup of code style issues.

Issue #69 allow bound method to be accepted as a value for field of type "Function"
Issue #70 allow to ignore assignment of None to a field. Useful when mapping from SQLAlchemy
Issue #71 Optional parameter to serializer/deserializer to convert between snake-case field names and camelCase. Useful when mapping between python names and names in Java/ Javascript, which use camelCase names
Issue #72 Fix a bug in Structure.fields_by_name() when using the syntax of field annotations.
Issue #73 clone a structure with overrides. Useful especially when you have an immutable structure, and you want to create another instance that is similar, but not identical.
Issue #74 expose mapping from exception String to a well formed structure for error info. Useful when the calling service/function needs a consistent way of handling errors
Issue #75 add option to output all errors when initializing, instead of failing on first error
Issue #76 fix error formating
issue #77 make decimal serializable
Issue #79 make repr behave like str
Issue #81 explicit cast

v2.3.9

19 May 05:18
Compare
Choose a tag to compare

#75 options to output all errors, instead of failing fast
#76 fixed error message formatting
#77 make decimal field serializable
#78 fix a defect in multiple inheritance