Construct PROV-O compliant provenance graphs.
Project description
The package supports the creation of PROV-O compliant provenance graphs.
The package requires Python 3.11.
Installation
You can install the package from the Python Package Index (PyPI):
pip install provo
Contents
The package implements the PROV-O starting point classes Entity, Activity and Agent as Python classes with methods to establish starting point properties between instances of these classes.
Features
The package’s objective is it to support the programmatical creation of provenance graphs that are compliant with the W3C Recommendation PROV-O: The PROV Ontology. Users of the package shall be enabled to tightly couple the generation of data with the generation of their provenance. As the package implements PROV-O, the created graph is exportable as an RDF document. Finally, the graph can be exported as a mermaid flowchart with some configuration options to adjust the style of the resulting chart.
Compliance
The PROV-O classes Entity, Activity, and Agent are implemented as Python classes.
The PROV-O properties wasGeneratedBy, wasDerivedFrom, wasAttributedTo, startedAtTime, used, wasInformedBy, endedAtTime, wasAssociatedWith, and actedOnBehalfOf are implemented as instance methods of their according classes.
Attributes that are passed to these methods are type-checked to enforce compliance with PROV-O.
Node Ids are checked for validity.
(Accidental) use of the same ID for different objects throws an error.
Ease of Use
The package implements full type hint support, thus enabling rich support from the IDE.
The classes Provence_Ontology_Graph, Entity, Activity, and Agent can be printed to terminal in a user-friendly, readable way with the default print() command.
For some quick testing, objects of the classes Entity, Activity, and Agent can be instantiated with auto-generated Ids (although it’s not recommended using this for production).
Export as [mermaid flowchart](https://mermaid-js.github.io/mermaid/#/flowchart) to review the graph visually.
Interface to RDF via the rdflib package
The graph’s contents can be converted to an rdflib.Graph object.
The graph can be exported in various RDF serializations.
Manual
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
File details
Details for the file provo-1.0.1.tar.gz
.
File metadata
- Download URL: provo-1.0.1.tar.gz
- Upload date:
- Size: 28.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b988e21b70e3b10e7037c38123008f66b241f43e1aea6219640ca1c269cfd72e |
|
MD5 | ab64fee7b9fef6466d47176b339cd82f |
|
BLAKE2b-256 | 40808a5f133c43efe68339f35c53bed62946bff46d7e1a1600620d5537787fae |
File details
Details for the file provo-1.0.1-py3-none-any.whl
.
File metadata
- Download URL: provo-1.0.1-py3-none-any.whl
- Upload date:
- Size: 24.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1f45271930fbdb04d78a3b0a48e08e7071c1d050c86ef03a2ed8f4f62227dcf1 |
|
MD5 | 45b351768b086715f59d56ff99462537 |
|
BLAKE2b-256 | 7b1caae76538f929181335556e6b95f1220820c7798e5126c50cea413785937f |