create efficent models starting from json schema
Project description
Usage
With the schema in types/schema.yaml
$schema: http://json-schema.org/schema#
properties:
name:
type: string
surname:
type: string
age:
type: integer
required:
- name
- surname
- age
you can load a model with automatic validation and efficent use of __slots__
import yaml
import modeler
schema = yaml.load(open('types/schema.yaml').read())
Model = modeler.make_model(schema=schema,)
Model(name='Tommaso', surname='De Rossi', age=19)
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
modeller-0.0.12.tar.gz
(4.7 kB
view hashes)
Built Distribution
Close
Hashes for modeller-0.0.12-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ad7357e3a62af811f9de910a8750955d1b88784067dc3143d932142a66933ec4 |
|
MD5 | 45432efe9ac987ddff4019ba02835b88 |
|
BLAKE2b-256 | f1a3c2f5dd7f103f1fa3c73c22201d17a10d872926fa86b5935e18cc06389ba6 |