Skip to main content

A Python library to validate Data Package datapackage.json files.

Project description

# datapackage-validate-py

Validate [Data Package][] datapackage.json files against a jsonschema.

[Data Package]: http://data.okfn.org/doc/data-package

## Usage

```python
import datapackage_validate

valid, errors = datapackage_validate.validate(datapackage, schema)
```

The `datapackage` can be a json string or python object.

The `schema` can be a json string, python object, or a schema id corresponding with a schema from the registry of [Data Package Profiles][]. `schema` is optional, and will default to the `base` schema id if not provided.

`validate()` returns a tuple (valid, errors):

`valid` is a boolean determining whether the datapackage validates against the schema.

`errors` is an array of error string messages. Empty if `valid` is True.

[Data Package Profiles]: https://github.com/dataprotocols/registry

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

datapackage-validate-0.0.1.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

datapackage_validate-0.0.1-py2.py3-none-any.whl (5.2 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file datapackage-validate-0.0.1.tar.gz.

File metadata

File hashes

Hashes for datapackage-validate-0.0.1.tar.gz
Algorithm Hash digest
SHA256 b60c0cfcdba5431dec581718d2ae34e60f457ce66fbd9e58f26bfa69eb79aad5
MD5 b5de38d1418384666a7d9dc3d6edfbcb
BLAKE2b-256 23af9418058e779a3513b9da95e19e16027a2bafdc61082084bde985190bc035

See more details on using hashes here.

Provenance

File details

Details for the file datapackage_validate-0.0.1-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for datapackage_validate-0.0.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 48b1b56fedb92deaa081b0848512c845e23b0d3bff5850b9100f29bfb7a9802a
MD5 b9e9d2154255285bbef3be73744e9ce2
BLAKE2b-256 09f1006ebb2cdf1ae76100ccb462d3a06576dc535e9c9be25849edcee249dd4a

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