Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

A simple python implementation of the W3C PROV data model

Project Description


`|Build Status| <>`_
`|License| <>`_
`|Latest Release| <>`_
`|Downloads| <>`_

A python library for W3C Provenance Data Model supporting PROV-O.

Kleio is free software released under the MIT license.


- An implementation of the W3C PROV Data Model in Python
- Supports serialization and deserialization as PROV-O in RDF/XML,
Turtle, TriG, N3, NTriples, and JSON-LD formats
- Supports provenance-of-provenance (PROV bundles) via named graphs
- Built using `RDFlib <>`_

Getting Started

Kleio can be installed from PyPI using the pip installer:


$ pip install kleio

From kleio use the prov module to generate PROV records and output

\`\`\`python from kleio import prov

prov.ns("test", "")

entity = prov.Entity("test:entity") entity.set\_label("example entity")

activity = prov.Activity("test:activity") activity.set\_label("example

print(prov.serialize(format="turtle")) \`\`\` output:


@prefix prov: <> .
@prefix rdf: <> .
@prefix rdfs: <> .
@prefix test: <> .
@prefix xml: <> .
@prefix xsd: <> .

<test:activity> a prov:Activity ;
rdfs:label "example activity" ;
prov:generated <test:entity> ;
prov:influenced <test:entity> .

<test:entity> a prov:Entity ;
rdfs:label "example entity" ;
prov:wasGeneratedBy <test:activity> ;
prov:wasInfluencedBy <test:activity> .

Kleio can also be used to load and update existing PROV-O records.


from kleio import prov

# load the existing PROV-O graph
prov.graph.load("load-example.ttl", format="turtle")

# get a reference to the existing entity with id="test:entity"
entity = prov.Entity("test:entity")

# ... update entity ...


More information is available on the project webpage:

Continuous integration status details available from Travis CI:

The documentation can be built by doing:


$ python build_sphinx

And is also available from ReadTheDocs:

.. |Build
Status| image::
.. |License| image::
.. |Latest Release| image::
.. |Downloads| image::

Release History

This version
History Node


History Node


History Node


History Node


Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, Size & Hash SHA256 Hash Help File Type Python Version Upload Date
(25.9 kB) Copy SHA256 Hash SHA256
Egg 3.3 Jul 28, 2016
(25.4 kB) Copy SHA256 Hash SHA256
Egg 3.4 Jul 28, 2016
(25.3 kB) Copy SHA256 Hash SHA256
Egg 3.5 Jul 28, 2016
(12.4 kB) Copy SHA256 Hash SHA256
Source None Jul 28, 2016

Supported By

Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Google Google Cloud Servers DreamHost DreamHost Log Hosting