This release is a pre-release and may not be stable for production use.
servicecatalogtordf
A library that will map a service catalog (cpsv) to rdf
The library contains helper classes for the following cpsv and related classes:
Usage
Install
% pip install servicecatalogtordf
Getting started
from datacatalogtordf import Catalog
from servicecatalogtordf import PublicOrganization, 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("http://example.com/services/1")
service.title = {"nb": "inntektsAPI", "en": "incomeAPI"}
# Create a public organization:
public_organization = PublicOrganization("https://example.com/publishers/1")
# Add it to the service:
service.has_competent_authority = public_organization
#
# Add service to catalog:
catalog.contains_services.append(service)
# Get rdf representation in turtle (default)
rdf = catalog.to_rdf()
print(rdf)
Development
Requirements
- pyenv (recommended)
- pipx (recommended)
- poetry
- nox
- nox-poetry
% pipx install poetry==1.1.7
% pipx install nox==2021.06.12
% pipx inject nox nox-poetry
Install locally
% git clone https://github.com/Informasjonsforvaltning/servicecatalogtordf.git
% cd servicecatalogtordf
% pyenv install 3.8.12
% pyenv install 3.9.10
% pyenv local 3.8.12 3.9.10
% 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().
Metadata
Release files for servicecatalogtordf 0.1.0a15
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 |
|---|---|---|---|---|
| servicecatalogtordf-0.1.0a15.tar.gz | 14.1 kB | Without provenance | Details for servicecatalogtordf-0.1.0a15.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| servicecatalogtordf-0.1.0a15-py3-none-any.whl | Python 3 | none | any | Details for servicecatalogtordf-0.1.0a15-py3-none-any.whl |
Total release size: 35.6 kB
Release files / servicecatalogtordf-0.1.0a15.tar.gz
| Download URL | servicecatalogtordf-0.1.0a15.tar.gz |
|---|---|
| Size | 14.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fba4fb806fbaab2d3357e93f8a430110a8441199a0823e4f325b2529c26b6639
|
|
BLAKE2b-256 checksum How to use checksums |
fc50e679634e566f822beabeaac43da4d8b3a392e799fc3126a35e6ff5dbaa36
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.13 CPython/3.8.10 Linux/5.13.0-1021-azure
|
Release files / servicecatalogtordf-0.1.0a15-py3-none-any.whl
| Download URL | servicecatalogtordf-0.1.0a15-py3-none-any.whl |
|---|---|
| Size | 21.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
92813d4a3caf6d8dbebb1d8501f94d776df0b160cc1c2c47c432e345f65ff4f2
|
|
BLAKE2b-256 checksum How to use checksums |
696ab34a247f3fa6ded10c63788471ea8489fb22ace53356a31ba8a14f3f9c8b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.13 CPython/3.8.10 Linux/5.13.0-1021-azure
|
Security for servicecatalogtordf 0.1.0a15
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.