Typesystem

Latest version: v0.4.1

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

Scan your dependencies

Page 1 of 2

0.4.1

Fixed

* Broken reference in OAS 3 - https://github.com/encode/typesystem/pull/122

0.4.0

Added

* Update JSON schema `ref` according to OAS 3: `/components/schemas/`

0.3.1

Added

* Email field (111)
* IPAddress field (114)
* URL field (117)

0.3.0

Version `0.3.0` changes how `Schema` validators are created. In this release validators are created as instances of `Schema`.

python
import typesystem

artist_schema = typesystem.Schema(
fields={
"name": typesystem.String(max_length=100)
}
)

definitions = typesystem.Definitions()
definitions["Artist"] = artist_schema

album_schema = typesystem.Schema(
fields={
"title": typesystem.String(max_length=100),
"release_date": typesystem.Date(),
"artist": typesystem.Reference("Artist", definitions=definitions)
}
)


The output of validation is also a `dict`, so there's no need to serialize validated data.

python
album, error = album_schema.validate_or_error(data)

0.3.0.dev2

0.3.0.dev1

Page 1 of 2

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.