Typedpy

Latest version: v2.28.3

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

Scan your dependencies

Page 4 of 9

2.0.1

62 Implicit wrapper of non-typedpy classes. This is a major improvement that allows the use of arbitrary classes in fields.
For example:
Assume we created class **Point**.

We can define the following structure:

python

class Example(ImmutableStructure):
my_point: Field[Point]
other_points: Array[Point]

note: instead of Array above, we could have used typing.List, or list. The behavior would be the same.

And it will magically work as though **Point** was a Typepy Field class. The exception is that it does not support pickling, and serialization is on a best-effort basis.

2.0.0

Issue 50 - improved documentation. Tutorial is still a work in progress
Issue 51 - support common types from typing module
Issue 52 - Support for 3.9.
Issue 53 Support PEP-585 for the basic collections (list, dict, tuple, set)
Issue 54 Support typing.union
Issue 55 Improvements for immutables
Issue 56 Support definition optional fields instead of required
Issue 57 ensure immutability of immutable structures using defensive deep copies
Issue 58 For Array, Map override all self mutating methods to protect against unvalidated updated
Issue 59 Explicit support for ImmutableSet using fronzenset. This is preferable to set with protections because its API does not have methods for updates, so it is more developer-friendly
Issue 60 Define basic immutable fields ImmutableMap, ImmutableArray, ImmutableSet etc
Issue 61 Bugfix - Iterators bypassing validation and immutability guards for array, map

1.637939691543579

1.50

Issue 46, 47, 48, 49

1. Introduce dataclass-like syntax, as an alternative. In addition, this includes:
* Automatic conversion of python basic typed to typedpy classes
* Support for default values, in the standard Python format, i.e. a: Array[String] = ['xx', 'yy']
* the "_required" attribute is updated automatically to reflect fields with default values. In other words: if a field has a default, then it is optional in the constructor.

Backward compatibility with standard Typedpy syntax is maintained.

2. Every default value is now validated automatically by typedpy. The following code: a: Integer(minimum=10) = 5 immediately raises an appropriate exception.

1.34

Issue 44
Issue 45

1.33

Issue 43

Page 4 of 9

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.