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
Close
Hashes for servicecatalogtordf-0.1.0a1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | e742d0836ec39b7eb310a01b8d739fc916c9663952f5c1918046021f89acb322 |
|
MD5 | 7d4a0207440f32ccd02f038bf93cb15c |
|
BLAKE2b-256 | 34cb79eecf401e26d46584b8cc876b53c257950dec055b4a90b5c8a85e08b0ef |
Close
Hashes for servicecatalogtordf-0.1.0a1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0ed21f8fff51a002ee665119296a333aec0fb01944b9fb0f345d35dbffca88ce |
|
MD5 | b7801591f89206e3ea71828938898d04 |
|
BLAKE2b-256 | 1707b957fce2e831bb7b09a3153fc7758796c34472c66c015d987bced80a84c8 |