Skip to main content

atlasdcat

Tests codecov PyPI Read the Docs

A Python library for mapping Apache Atlas Glossary terms to DCAT metadata and vice versa.

Specification the Norwegian Application Profile of the DCAT standard.

Usage

Install

% pip install atlasdcat

Getting started

# Example...
from atlasdcat import AtlasDcatMapper
from pyapacheatlas.auth import BasicAuthentication
from pyapacheatlas.core.glossary import GlossaryClient

atlas_auth = BasicAuthentication(username="dummy", password="dummy")
atlas_client = GlossaryClient(
    endpoint_url="http://atlas", authentication=atlas_auth
)

mapper = AtlasDcatMapper(
    glossary_client=atlas_client,
    glossary_id="myglossary",
    catalog_uri="https://domain/catalog",
    catalog_language="http://publications.europa.eu/resource/authority/language/NOB",
    catalog_title="Catalog",
    catalog_publisher="https://domain/publisher",
    dataset_uri_template="http://domain/datasets/{guid}",
    distribution_uri_template="http://domain/distributions/{guid}",
    language="nb",
)

try:
    catalog = mapper.map_glossary_to_dcat_dataset_catalog()
    print(catalog.to_rdf())
except Exception as e:
    print(f"An exception occurred: {e}")

For an example of usage of this library in a simple server, see example.

Development

Requirements

% pip install poetry==1.1.13
% pip install nox==2022.1.7
% pip inject nox nox-poetry==1.0.0

Install developer tools

% git clone https://github.com/Informasjonsforvaltning/atlasdcat.git
% cd atlasdcat
% pyenv install 3.8.12
% pyenv install 3.9.10
% pyenv install 3.10.
% pyenv local 3.8.12 3.9.10 3.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 atlasdcat 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for atlasdcat 1.0.1
File Size Uploaded Provenance Actions
atlasdcat-1.0.1.tar.gz 11.8 kB Without provenance Details for atlasdcat-1.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for atlasdcat 1.0.1
File Interpreter ABI Platform Actions
atlasdcat-1.0.1-py3-none-any.whl Python 3 none any Details for atlasdcat-1.0.1-py3-none-any.whl

Total release size: 23.3 kB

Release files / atlasdcat-1.0.1.tar.gz

Download URL atlasdcat-1.0.1.tar.gz
Size 11.8 kB
Tags Source
SHA-256 checksum
How to use checksums
400d875df211a4810eba8da3ef36613914a1707b5dfd52704217c5d8bb7225e6
BLAKE2b-256 checksum
How to use checksums
ecdc6c52dae64e8a7e5199c8b236554b6a3fff6fcd16bd21622c8e530e6fd719
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-1031-azure

Release files / atlasdcat-1.0.1-py3-none-any.whl

Download URL atlasdcat-1.0.1-py3-none-any.whl
Size 11.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a072c26f0a1164da7183ad19dc4eb1d202eef48af6397fd6ac96ccebd14bb3e4
BLAKE2b-256 checksum
How to use checksums
212c953bd6effb91be262f5494f476f02ba751d25b9c20ac05d8c027406f40b3
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-1031-azure

Security for atlasdcat 1.0.1

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page