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.10.tar.gz
(4.7 kB
view hashes)
Built Distribution
Close
Hashes for modeller-0.0.10-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fa53836838b14e192954442491e1d77d0453580f9512395d6be96c7b7dc8aacc |
|
MD5 | 407912570998f419e14ce7dd607bf6b8 |
|
BLAKE2b-256 | b8fb1ddc5a724015bb738576a828b0f09f8900a085981f1c96a9d08d83610df8 |