<https://github.com/datapackages/datapackage-py> instead. This repository is
just for historical purposes.**
datapackage-registry-py
=======================
A Python library for working with a Data Package Registry.
It comes with a cached version of the registry and schemas from
<https://github.com/dataprotocols/schemas>.
Usage
-----
```python
import datapackage_registry
# get the default registry objects
registry = datapackage_registry.Registry()
# see the available profiles in the registry
print(registry.available_profiles)
# {
# 'base': {
# 'id': 'base',
# 'schema': 'https://rawgit.com/dataprotocols/schemas/master/data-package.json',
# 'specification': 'http://dataprotocols.org/data-packages',
# 'title': 'Data Package'
# },
# 'tabular': {
# 'id': 'tabular',
# 'schema': 'https://rawgit.com/dataprotocols/schemas/master/tabular-data-package.json',
# 'specification': 'http://dataprotocols.org/tabular-data-package/',
# 'title': 'Tabular Data Package'
# }
# }
# get a profile by its id
base_profile = registry.get('base')
```
If you’d like to use a custom registry, you can pass its URL or local
path to the `Registry()` constructor, as in:
```python
import datapackage_registry
registry = datapackage_registry.Registry('http://someplace.com/my-registry.csv')
```
If you’d like to get a schema that's not in the registry, you can pass its URL
or local path to `Registry().get_external()` method, as in:
```python
import datapackage_registry
registry = datapackage_registry.Registry()
try:
schema = registry.get_external('http://someplace.com/schema.json')
except datapackage_registry.exceptions.DataPackageRegistryException:
pass # handle error
```
Developer notes
---------------
These notes are intended to help people that want to contribute to this
package itself. If you just want to use it, you can safely ignore this.
### Updating the local schemas cache
We cache the schemas from <https://github.com/dataprotocols/schemas>
using git-subtree. To update it, use:
git subtree pull --prefix datapackage_registry/schemas https://github.com/dataprotocols/schemas.git master --squash
Metadata
Release files for datapackage-registry 0.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| datapackage-registry-0.5.0.tar.gz | 9.6 kB | Without provenance | Details for datapackage-registry-0.5.0.tar.gz |
Release files / datapackage-registry-0.5.0.tar.gz
| Download URL | datapackage-registry-0.5.0.tar.gz |
|---|---|
| Size | 9.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
66abf635975f1f9ff45f9e557cb6f368c2bcbd9454f1a2630966937906dc1e42
|
|
BLAKE2b-256 checksum How to use checksums |
3152ec6c9ac3f0c8261aeb85f6ceb76e3898c47eb8fe8652a20fdac79d6cb3c6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for datapackage-registry 0.5.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.