Python implementation of FAIR Data Point
Project description
FAIR Data Point (FDP)
Python implementation of FAIR Data Point.
FDP is a RESTful web service that enables data owners to describe and to expose their datasets (metadata) as well as data users to discover more information about available datasets according to the FAIR Data Guiding Principles. In particular, FDP addresses the findability or discoverability of data by providing machine-readable descriptions (metadata) at four hierarchical levels:
FDP->catalogs->datasets->distributions
FDP software specification can be found here
FDP has been implemented in:
Installation
To install FDP, do
From pypi
pip install fairdatapoint
Or from this repo
git clone https://github.com/NLeSC/fairdatapoint.git
cd fairdatapoint
pip install .
Running
fdp-run localhost 80
Then visit from your browser: http://localhost/
Unit testing
Run tests (including coverage) with:
pip install .[tests]
pytest
TODO: Include a link to your project's full documentation here.
Deploy with Docker
Download the docker-compose.prod.yml
from this repo, change the HOSTNAME
in the file to a proper host.
The default port is 80
, and you can use other port (e.g. 8080
) if port 80
is used.
Then run the command
docker-compose -f docker-compose.prod.yml up -d
Deploy without Docker
Before deploying FDP, it's necessary to first have a running SPARQL database.
pip install fairdatapoint
# fdp-run <host> <port> --db=<sparql-endpoint>
fdp example.com 80 --db='http://dbpedia.org/sparql'
Web API documentation
FAIR Data Point (FDP) exposes the following endpoints (URL paths):
Endpoint | GET | POST | DELETE |
---|---|---|---|
fdp | Output metadata triples | Remove existing triples for a specific ID, then create new triples with the request data | Not Allowed |
catalog/ | Output all IDs | Remove existing triples for a specific ID, then create new triples with the request data | Remove all IDs |
dataset/ | Output all IDs | Remove existing triples for a specific ID, then create new triples with the request data | Remove all IDs |
distribution/ | Output all IDs | Remove existing triples for a specific ID, then create new triples with the request data | Remove all IDs |
catalog/<catalogID> | Output metadata triples | Not Allowed | Remove the specific ID |
dataset/<datasetID> | Output metadata triples | Not Allowed | Remove the specific ID |
distribution/<distributionID> | Output metadata triples | Not Allowed | Remove the specific ID |
Access endpoints to request metadata programmatically
FDP: curl -iH 'Accept: text/turtle' [BASE URL]/fdp
Catalog: curl -iH 'Accept: text/turtle' [BASE URL]/catalog/catalog01
Dataset: curl -iH 'Accept: text/turtle' [BASE URL]/dataset/dataset01
Distribution: curl -iH 'Accept: text/turtle' [BASE URL]/distribution/dist01
FDP supports the following RDF serializations (MIME-types):
- Turtle:
text/turtle
- N-Triples:
application/n-triples
- N3:
text/n3
- RDF/XML:
application/rdf+xml
- JSON-LD:
application/ld+json
Contributing
If you want to contribute to the development of FAIR Data Point, have a look at the contribution guidelines.
License
Copyright (c) 2019,
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Credits
This package was created with Cookiecutter and the NLeSC/python-template.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file fairdatapoint-0.7.0.tar.gz
.
File metadata
- Download URL: fairdatapoint-0.7.0.tar.gz
- Upload date:
- Size: 24.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a8dc07ab0d4b569580cf536fe2323445d9b1d8edab9e2c8e8900424422fe2ec4 |
|
MD5 | 2570f813b11f8a7e1a0125a2dce9660c |
|
BLAKE2b-256 | 91ea4e52a5a6c45f10dfacf49f069a03f1af1a8c055e0adc29dc45d12462b777 |
File details
Details for the file fairdatapoint-0.7.0-py3-none-any.whl
.
File metadata
- Download URL: fairdatapoint-0.7.0-py3-none-any.whl
- Upload date:
- Size: 18.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8a89d14604ffdd483b1ce2139cb034b9fd6d49cb8c6e6b540428b662b5b80459 |
|
MD5 | d35cb7382e22dfd14e2c86d6c0613281 |
|
BLAKE2b-256 | c682a61ba551262aa67f65fcf33f45ecae58b0a97329e0c347ef4d3646948f45 |