Skip to main content

JSON schema definition and validation library

Project description

json_schema is a JSON-based schema validation package.

JSON-based means that its feature-set is adjusted to JSON, but it doesn’t require JSON data: any Python objects are fine, as long as they’re of the primary Python types.

Let’s start off with an example:

from json_schema import Schema, AnyInteger

my_schema = Schema([u"set-temp", {u"degrees": AnyInteger}])

if my_schema.validate([u"set-temp", {u"degrees": 10}]):
    print "Valid!"

It’s a very declarative way of saying how your schema looks. With the architechture that json_schema is built on, you can customize pretty much anything.

Project details


Download files

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

Source Distribution

json_schema-0.3.tar.gz (5.4 kB view details)

Uploaded Source

File details

Details for the file json_schema-0.3.tar.gz.

File metadata

  • Download URL: json_schema-0.3.tar.gz
  • Upload date:
  • Size: 5.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for json_schema-0.3.tar.gz
Algorithm Hash digest
SHA256 a164efbb405f535615e58aff191b55fbfdad61d2ff0e7bfce6acf086358ca4b3
MD5 59e75cb6b7f192ea01507512a7e7ede8
BLAKE2b-256 2a04855eecfdd379ff774ce86770808c6663ad4fdf14c43ed4e6fd7156aa5cf9

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page