district42 to JSON-Schema translator and vise versa
Project description
SchemaMaximal
district42 schemas โ JSON Schema
Installation
pip3 install schemax
Usage
>>> import schemax
>>> from district42 import schema
>>> ExampleSchema = schema.str.len(1, 10)
>>> schemax.to_json_schema(ExampleSchema)
{'type': 'string', 'minLength': 1, 'maxLength': 10}
Supported d42 -> JSON Schema types and features
(โ - done; ๐ง - planned support; โ - unsupportable)
- None:
- โ schema.none
- Bool:
- Int:
- Float:
- Str:
- List:
- Dict:
- Any:
- โ schema.any
- โ schema.any(*types)
- โ schema.const
- โ schema.bytes
Supported JSON Schema -> d42 types and features
(โ - done; ๐ง - planned support; โ - unsupportable)
- โ null
- โ boolean
- โ
integer
- โ minimum
- โ maximum
- โ exclusiveMinimum Keep in mind, that we're just taking exclusiveMinimum + 1 as schema.int.min
- โ exclusiveMaximum Keep in mind, that we're just taking exclusiveMaximum - 1 as schema.int.max
- โ multiples
- โ
number
- โ minimum
- โ maximum
- ๐ง exclusiveMinimum
- ๐ง exclusiveMaximum
- โ multiples
- โ string
- โ
array
- โ items
- โ length
- โ prefixItems
- โ unevaluatedItems
- โ uniqueness
- โ
object
- โ properties
- โ patterProperties
- โ additionalProperties
- โ requiredProperties
- โ propertyName
- โ size
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
schemax-0.0.0rc1.tar.gz
(12.5 kB
view hashes)
Built Distribution
schemax-0.0.0rc1-py3-none-any.whl
(10.6 kB
view hashes)
Close
Hashes for schemax-0.0.0rc1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4de2bdc5a2b092f061b47cf95d9e338824390d5727acda1fcf5cf46bccc63ac4 |
|
MD5 | 21fe9160ab48028dbfc5f1a300b03458 |
|
BLAKE2b-256 | 7946e2c86050a7ce4a273c6103543bee902bd9da758e6346eb0ff329c253708c |