definition of classes with json-schema, object management and code-generation
Project description
Description
I’m Cédric ROMAN.
ngoschema aims at building classes based on a JSON schema.
User can declare its attributes in a schema (along with their type, default value) and the class will be built with accessors to check and validate data.
User can add methods and override setters/getters, but the library provides a boiler plate to automatically create the class, nicely instrumented (with loggers, exception handling, type checking, data validation, etc…).
Objects created are come with managers to load/save them into files.
Serialization tools are provided that can be used to do code generation.
The library is build on top of python-jsonschema-object, with a lot of hacking, which allows to create classes from a JSON-schema.
Both projects use the library python-jsonchema, a python implementation for JSON schema validation.
Free software: GNU General Public License v3
Installation
pip install ngoschema
Documentation
Development
To run the all tests run:
tox
Note, to combine the coverage data from all the tox environments run:
Windows |
set PYTEST_ADDOPTS=--cov-append tox |
---|---|
Other |
PYTEST_ADDOPTS=--cov-append tox |
Changelog
0.1.0 (2018-06-04)
First release on PyPI.
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
Built Distribution
Hashes for ngoschema-0.2.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7aec97108e57401fbb82193fb045784b25ceecd39eb458ae596c501601e9c154 |
|
MD5 | 0307292db6c2f4ec71e6488b5812b9fe |
|
BLAKE2b-256 | cc20247d848e7ef0b3e1cec84d1a71a7ffcb583f6f3cdcb5ceca3a84037f4f5e |