Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Schema Annotations for Linked Avro Data (SALAD)

Project Description

Schema Salad

Salad is a schema language for describing JSON or YAML structured linked data documents. Salad is based originally on JSON-LD and the Apache Avro data serialization system.

Salad schema describes rules for preprocessing, structural validation, and link checking for documents described by a Salad schema. Salad features for rich data modeling such as inheritance, template specialization, object identifiers, object references, documentation generation, and transformation to RDF. Salad provides a bridge between document and record oriented data modeling and the Semantic Web.

Usage

$ pip install schema_salad
$ schema-salad-tool
usage: schema-salad-tool [-h] [--rdf-serializer RDF_SERIALIZER]
                      [--print-jsonld-context | --print-doc | --print-rdfs | --print-avro | --print-rdf | --print-pre | --print-index | --print-metadata | --version]
                      [--strict | --non-strict]
                      [--verbose | --quiet | --debug]
                      schema [document]
$ python
>>> import schema_salad

To install from source:

git clone https://github.com/common-workflow-language/schema_salad
cd schema_salad
python setup.py install

Documentation

See the specification and the metaschema (salad schema for itself). For an example application of Schema Salad see the Common Workflow Language.

Rationale

The JSON data model is an popular way to represent structured data. It is attractive because of it’s relative simplicity and is a natural fit with the standard types of many programming languages. However, this simplicity comes at the cost that basic JSON lacks expressive features useful for working with complex data structures and document formats, such as schemas, object references, and namespaces.

JSON-LD is a W3C standard providing a way to describe how to interpret a JSON document as Linked Data by means of a “context”. JSON-LD provides a powerful solution for representing object references and namespaces in JSON based on standard web URIs, but is not itself a schema language. Without a schema providing a well defined structure, it is difficult to process an arbitrary JSON-LD document as idiomatic JSON because there are many ways to express the same data that are logically equivalent but structurally distinct.

Several schema languages exist for describing and validating JSON data, such as JSON Schema and Apache Avro data serialization system, however none understand linked data. As a result, to fully take advantage of JSON-LD to build the next generation of linked data applications, one must maintain separate JSON schema, JSON-LD context, RDF schema, and human documentation, despite significant overlap of content and obvious need for these documents to stay synchronized.

Schema Salad is designed to address this gap. It provides a schema language and processing rules for describing structured JSON content permitting URI resolution and strict document validation. The schema language supports linked data through annotations that describe the linked data interpretation of the content, enables generation of JSON-LD context and RDF schema, and production of RDF triples by applying the JSON-LD context. The schema language also provides for robust support of inline documentation.

Release History

Release History

This version
History Node

2.6.20170806163416

History Node

2.6.20170712194300

History Node

2.6.20170630075932

History Node

2.6.20170628130600

History Node

2.5.20170623152720

History Node

2.5.20170428142041

History Node

2.5.20170328195758

History Node

2.5.20170327140858

History Node

2.5.1.20170628121527

History Node

2.4.20170308171942

History Node

2.3.20170302225134

History Node

2.3.20170302150835

History Node

2.2.20170222151604

History Node

2.2.20170216125639

History Node

2.2.20170208112505

History Node

2.2.20170126160727

History Node

2.2.20170119151016

History Node

2.2.20170111180227

History Node

2.1.20161227191302

History Node

2.1.20161223160831

History Node

2.1.20161221160224

History Node

2.1.20161216210732

History Node

2.0.20161122040508

History Node

1.21.20161215163938

History Node

1.21.20161206204028

History Node

1.21.20161206181442

History Node

1.21.20161202201331

History Node

1.20.20161122192122

History Node

1.18.20161005190847

History Node

1.18.20160930145650

History Node

1.18.20160907135919

History Node

1.17.20160820171034

History Node

1.17.20160820165726

History Node

1.16.20160819133325

History Node

1.16.20160810195039

History Node

1.15.20160810152809

History Node

1.14.20160708181155

History Node

1.14.20160707164023

History Node

1.13.20160702001514

History Node

1.13.20160630144631

History Node

1.12.20160610104117

History Node

1.12.20160610092802

History Node

1.11.20160524152859

History Node

1.11.20160506154702

History Node

1.10.20160505185111

History Node

1.10.20160505184637

History Node

1.9.20160421133216

History Node

1.7.20160316203940

History Node

1.7.20160316150109

History Node

1.7.20160316145902

History Node

1.7.20160315232142

History Node

1.7

History Node

1.6.20160202222448

History Node

1.5.20160126213649

History Node

1.5.20160126190004

History Node

1.5.20160126150511

History Node

1.4.20160108200836

History Node

1.4.20160108152457

History Node

1.3.20160108151816

History Node

1.2.20151210153655

History Node

1.1.1

History Node

1.1.0

History Node

1.0.6

History Node

1.0.5

History Node

1.0.4

History Node

1.0.3

History Node

1.0.2

History Node

1.0.1

History Node

1.0

Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
schema_salad-2.6.20170806163416-py2.py3-none-any.whl (323.5 kB) Copy SHA256 Checksum SHA256 py2.py3 Wheel Aug 7, 2017
schema-salad-2.6.20170806163416.tar.gz (296.7 kB) Copy SHA256 Checksum SHA256 Source Aug 7, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting