Validation and parsing library
Project description
Trafaret Schema
===============
Project takes json schema and converts it to Trafaret instance:
from trafaret_schema import json_schema
check_string = json_schema({'type': 'string', 'minLength': 6, 'maxLength': 10, 'pattern': '(bla)+'})
check_string('blablabla')
Project is a bit of fun, because it implemented in `trafaret` and produces `trafaret` instances. Also its like
a pro level of `trafaret` usage (I hope so).
Features:
[*] basic
[*] type
[*] enum
[*] const
[*] number
[*] string
[*] array
[*] minProperties
[*] maxProperties
[*] uniqueItems
[*] items
[*] additionalItems
[*] contains
[*] objects
[*] maxProperties
[*] minProperties
[*] required
[*] properties
[*] patternProperties
[*] additionalProperties
[*] dependencies
[*] propertyNames
[*] combinators
[*] anyOf
[*] allOf
[*] oneOf
[*] not
[ ] format
[*] references
[*] definitions
[*] $ref
===============
Project takes json schema and converts it to Trafaret instance:
from trafaret_schema import json_schema
check_string = json_schema({'type': 'string', 'minLength': 6, 'maxLength': 10, 'pattern': '(bla)+'})
check_string('blablabla')
Project is a bit of fun, because it implemented in `trafaret` and produces `trafaret` instances. Also its like
a pro level of `trafaret` usage (I hope so).
Features:
[*] basic
[*] type
[*] enum
[*] const
[*] number
[*] string
[*] array
[*] minProperties
[*] maxProperties
[*] uniqueItems
[*] items
[*] additionalItems
[*] contains
[*] objects
[*] maxProperties
[*] minProperties
[*] required
[*] properties
[*] patternProperties
[*] additionalProperties
[*] dependencies
[*] propertyNames
[*] combinators
[*] anyOf
[*] allOf
[*] oneOf
[*] not
[ ] format
[*] references
[*] definitions
[*] $ref
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
trafaret_schema-0.1.0.tar.gz
(6.3 kB
view details)
File details
Details for the file trafaret_schema-0.1.0.tar.gz
.
File metadata
- Download URL: trafaret_schema-0.1.0.tar.gz
- Upload date:
- Size: 6.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fe3a092a00b6b7e3ed15dbb8f2933733da3590a45108f5e0226d42880794bd6d |
|
MD5 | 5470e9386c57691bf1db7f47341e2de6 |
|
BLAKE2b-256 | 3ef118f3824b0d790a6bac559ef64366ff2a0db983c754ad5b816f724847ec79 |