fairdatapoint-client
Interact with your resources (catalogs/datasets/distributions) in a FDP using python
Science Score: 54.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
✓Academic publication links
Links to: zenodo.org -
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (13.4%) to scientific vocabulary
Repository
Interact with your resources (catalogs/datasets/distributions) in a FDP using python
Basic Info
Statistics
- Stars: 0
- Watchers: 0
- Forks: 1
- Open Issues: 1
- Releases: 2
Metadata Files
README.md
fairdatapoint-client
Contents
Overview
fairdatapoint-client is a simple and elegant library to interact with FAIR Data Point resources from Python, e.g. read and write catalogs, datasets and distributions in an FDP server.
The supported APIs are listed below:
| FDP Layers | Path Endpoint | Specific Resource Endpoint | |--------------|-----------------------------|-----------------------------------------| | fdp | [baseURL] or [baseURL]/fdp | | | catalog | [baseURL]/catalog | [baseURL]/catalog/[catalogID] | | dataset | [baseURL]/dataset | [baseURL]/dataset/[datasetID] | | distribution | [baseURL]/distribution | [baseURL]/distribution/[distributionID] |
Installation
It requires a Python version of 3.7, 3.8 or 3.9.
Stable Release
The fairdatapoint-client is available on PyPI, you can install it using:
pip install fairdatapoint-client
Development Version
You can also install from the latest source code, but note that the in-development version might be unstable:
{.sourceCode .console}
git clone https://github.com/fair-data/fairdatapoint-client.git
cd fairdatapoint-client
pip install .
To run tests (including coverage):
{.sourceCode .console}
pip install '.[tests]'
pytest
Tutorial
Using Client
```python from fdpclient.client import Client
create a client with base URL
client = Client('http://example.org')
create metadata
with open('catalog01.ttl') as f: data = f.read() client.create_catalog(data)
let's assume the catalogID was assigned as 'catalog01'
read metadata, return a RDF graph
r = client.read_catalog('catalog01') print(r.serialize(format="turtle").decode("utf-8"))
update metadata
with open('catalog01update.ttl') as f: dataupdate = f.read() client.updatecatalog('catalog01', dataupdate)
delete metadata
client.delete_catalog('catalog01') ```
Using operation functions
```python from fdpclient import operations
create metadata
with open('catalog01.ttl') as f: data = f.read() operations.create('http://example.org/catalog', data)
read metadata, return a RDF graph
r = operations.read('http://example.org/catalog/catalog01') print(r.serialize(format="turtle").decode("utf-8"))
update metadata
with open('catalog01update.ttl') as f: dataupdate = f.read() operations.update('http://example.org/catalog/catalog01', data_update)
delete metadata
operations.delete('http://example.org/catalog/catalog01') ```
Issues and Contributing
If you have questions or find a bug, please report the issue in the Github issue channel.
If you want to contribute to the development of fairdatapoint-client, have a look at the contribution guidelines.
Owner
- Name: FAIR Data Toolkit
- Login: fair-data
- Kind: organization
- Location: Amsterdam
- Website: https://www.esciencecenter.nl/
- Repositories: 4
- Profile: https://github.com/fair-data
Citation (CITATION.cff)
# YAML 1.2
# Metadata for citation of this software according to the CFF format (https://citation-file-format.github.io/)
---
abstract: "fairdatapoint-client is a simple and elegant library to interact with FAIR Data Point resources from Python"
authors:
-
affiliation: "Netherlands eScience Center"
family-names: Geng
given-names: Cunliang
orcid: "https://orcid.org/0000-0002-1409-8358"
-
affiliation: "Netherlands eScience Center"
family-names: Veen
given-names: Lourens
orcid: "https://orcid.org/0000-0002-6311-1168"
cff-version: "1.2.0"
keywords:
- "FAIR data"
license: "Apache-2.0"
message: "If you use this software, please cite it using these metadata."
repository-code: "https://github.com/fair-data/fairdatapoint-client"
title: fairdatapoint-client
version: "0.1.0"
GitHub Events
Total
Last Year
Committers
Last synced: about 3 years ago
All Time
- Total Commits: 38
- Total Committers: 1
- Avg Commits per committer: 38.0
- Development Distribution Score (DDS): 0.0
Top Committers
| Name | Commits | |
|---|---|---|
| Cunliang Geng | c****g@e****l | 38 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 8 months ago
All Time
- Total issues: 0
- Total pull requests: 5
- Average time to close issues: N/A
- Average time to close pull requests: 3 days
- Total issue authors: 0
- Total pull request authors: 2
- Average comments per issue: 0
- Average comments per pull request: 1.6
- Merged pull requests: 4
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
- CunliangGeng (4)
- Markus92 (2)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- pypi 16 last-month
- Total dependent packages: 0
- Total dependent repositories: 1
- Total versions: 1
- Total maintainers: 1
pypi.org: fairdatapoint-client
FAIR Data Point API client
- Homepage: https://github.com/fair-data/fairdatapoint-client
- Documentation: https://fairdatapoint-client.readthedocs.io/
- License: Apache Software License 2.0
-
Latest release: 0.1.0
published about 5 years ago
Rankings
Maintainers (1)
Dependencies
- Sphinx >=3.4.3
- ipython >=7.19.0
- coveralls >=3.0.0
- pytest >=6.2.2
- pytest-cov >=2.11.1
- pytest-datadir-ng >=1.1.1
- rdflib >=4.2.2
- rdflib-jsonld >=0.5.0
- requests >=2.25.1
- requests-mock >=1.8.0
- rdflib *
- rdflib-jsonld *
- requests *
- actions/checkout v2 composite
- actions/setup-python v2 composite
- actions/checkout v2 composite
- citation-file-format/cffconvert-github-action 2.0.0 composite