Madtypes

Latest version: v0.0.9

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

Scan your dependencies

Page 2 of 2

0.0.3

changes:
- Immutable class
- typing.Optional should be used to define nullable attributes. Now raise TypeError when some attributes are missing.
- non optional fields are rendered as required in json-schema

**Full Changelog**: https://github.com/6r17/madtypes/compare/v0.0.2...v0.0.3

0.0.2

- This release is meant to explicitly define the python version supported (3.9 +, `madtypes` is using typing.get_args et typing.get_origin which were introduced in python 3.9).

- It should also fix the bad long_description on pypi

**Full Changelog**: https://github.com/6r17/madtypes/compare/v0.0.1...v0.0.2

0.0.1

:tada: Initial release includes :

- `Schema` class will raise TypeError at incorrect instantiation
- `Schema` class will raise TypeError at incorrect set
- `Schema` class can be used to define an object when using the `schema` function
- The `schema` function will render an annotation as a json-schema
- It is possible to use `Annotation` class to define a "description" on the fields which will be used in the rendered schema
- `Schema` class inherits from `dict` ; all attributes are set as values of the dict
- `Schema` class natively __repr__ to it's dict equivalent
- `Schema` class natively renders trough json.dumps

Page 2 of 2

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.