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.11.tar.gz
(4.7 kB
view hashes)
Built Distribution
Close
Hashes for modeller-0.0.11-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d408421213ac3aeb1b49fca6d883dd29930deb097474a9a6b76bc25db2d51ee3 |
|
MD5 | b72b91564f22ac6651d62e63d52d8b5f |
|
BLAKE2b-256 | 2edd85a1f26c6cfa0cfa5a862102457b573f6b940737e1ae28d3d9d6f479672e |