Skip to main content

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

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for ngoschema, version 0.2.2
Filename, size File type Python version Upload date Hashes
Filename, size ngoschema-0.2.2-py2.py3-none-any.whl (48.8 kB) File type Wheel Python version py2.py3 Upload date Hashes View hashes
Filename, size ngoschema-0.2.2.tar.gz (77.8 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page