A library that will map a service catalog (cpsv) to rdf
Project description
servicecatalogtordf
A library that will map a service catalog (cpsv) to rdf
The library contains helper classes for the following dcat classes:
Usage
Install
% pip install servicecatalogtordf
Getting started
from datacatalogtordf import Catalog
from servicecatalogtordf import Service
# Create catalog object
catalog = Catalog()
catalog.identifier = "http://example.com/catalogs/1"
catalog.title = {"en": "A service catalog"}
catalog.publisher = "https://example.com/publishers/1"
# Create a service:
service = Service()
service.identifier = "http://example.com/services/1"
service.title = {"nb": "inntektsAPI", "en": "incomeAPI"}
#
# Add service to catalog:
catalog.services.append(service)
# Get rdf representation in turtle (default)
rdf = catalog.to_rdf()
print(rdf.decode())
Development
Requirements
- pyenv (recommended)
- pipx (recommended)
- poetry
- nox
- nox-poetry
% pipx install poetry==1.1.6
% pipx install nox==2020.12.31
% pipx inject nox nox-poetry
Install
% git clone https://github.com/Informasjonsforvaltning/servicecatalogtordf.git
% cd servicecatalogtordf
% pyenv install 3.9.4
% pyenv local 3.9.4
% poetry install
Run all sessions
% nox
Run all tests with coverage reporting
% nox -rs tests
Debugging
You can enter into Pdb by passing --pdb to pytest:
nox -rs tests -- --pdb
You can set breakpoints directly in code by using the function breakpoint().
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file servicecatalogtordf-0.1.0a2.tar.gz.
File metadata
- Download URL: servicecatalogtordf-0.1.0a2.tar.gz
- Upload date:
- Size: 8.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.6 CPython/3.9.5 Linux/5.4.0-1047-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
478ad1ca2ec8d4b66e444bad7e45b6eef08f0f83046c3eb5fea8fc9e4f172841
|
|
| MD5 |
2c61899fbf2967ff5f0e4b88127177e0
|
|
| BLAKE2b-256 |
9b870cdf02e095a04635cae9ec66ea56c9d147d7c23863c06cd457dc0e7fb0b0
|
File details
Details for the file servicecatalogtordf-0.1.0a2-py3-none-any.whl.
File metadata
- Download URL: servicecatalogtordf-0.1.0a2-py3-none-any.whl
- Upload date:
- Size: 10.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.6 CPython/3.9.5 Linux/5.4.0-1047-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
10c810ae08f8e18b26cdd5cb436068b44fe4e218656de0bdab266d2cbf583764
|
|
| MD5 |
3c31385f77301e09bf557322f682a6b0
|
|
| BLAKE2b-256 |
ddf347314483bf3a286272d213973bb1267844e38079abe161b01e3b481e3ab5
|