Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Programmatic building of JSON schemas (document and field mappings) with validation.

License

NotificationsYou must be signed in to change notification settings

petrounias/json-schema-toolkit

Repository files navigation

Programmatic building of JSON schemas (recursive field mappings) withvalidation, a Django JSON Field, and native PostgreSQL JSON type constraints.

Version 1.0.0 alpha

Documentationhttps://json-schema-toolkit.readthedocs.org

Overview

Built on top ofhttps://github.com/zyga/json-document/ andhttps://github.com/zyga/json-schema-validator/, withpowerful support for building and validating JSON documents. Can be used toprogrammatically build JSON schemas by mapping fields to a document orrecursively to other fields, as well as used for validating a Django JSON fieldduring save operations. If PostgreSQL >= 9.2 is used, supports the native JSONdata type. If PostgreSQL >= 9.3 is used, supports custom JSON SQL constraintgeneration for the Django Model.

Extends json_document to provide nullable fields (in additional to optionalfields), deletion of members (through del), a Pythonic API for dot notationmember access, as well as convenience input transformations for data such asdates and times, time deltas, and others.

Prerequisites

Core:

  • Python >= 2.6
  • json_document >= 0.8
  • json_schema_validator >= 2.3

Optionally, for the Django field:

  • Django >= 1.4

Optionally, for PostgreSQL native JSON data type:

  • PostgreSQL >= 9.2
  • psycopg2 >= 2.4

Optionally, for JSON SQL constraints:

  • PostgreSQL >= 9.3

Optionally, for testing:

  • unittest2 >= 0.5.1

Obtaining

Installation

Ensure the required packages json_document and json_schema_validator areinstalled, and then install json_schema_toolkit:

Via setup tools::

python setup.py install

Via pip and pypi::

pip install json-schema-toolkit

Release Notes

  • v1.0.0 alpha @ 16 June 2013 Initial public release.

Development Status

Actively developed and maintained. Currently used in production in proprietaryprojects by the author and his team.

Future Work

  • Django Field and custom PostgreSQL JSON data type support.

Contributors

Written and maintained by Alexis Petrounias <http://www.petrounias.org/ >

Based on work and feedback by Zygmunt Krynicki <http://www.suxx.pl/ >

License

Released under the OSI-approved BSD license. Please note that json_document andjson_schema_validator are LGPLv3 and not copyleft-free, so this may affect yourability to include this software's requirements in proprietary software. Thissoftware only links against the aforementioned libraries in accordance withtheir license.

Copyright (c) 2013 Alexis Petrounias <www.petrounias.org >,all rights reserved.

Redistribution and use in source and binary forms, with or without modification,are permitted provided that the following conditions are met:

Redistributions of source code must retain the above copyright notice, this listof conditions and the following disclaimer.

Redistributions in binary form must reproduce the above copyright notice, thislist of conditions and the following disclaimer in the documentation and/orother materials provided with the distribution.

Neither the name of the author nor the names of its contributors may be used toendorse or promote products derived from this software without specific priorwritten permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" ANDANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIEDWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE AREDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FORANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ONANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THISSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

About

Programmatic building of JSON schemas (document and field mappings) with validation.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp