Skip to main content

provenance

Version Status Conda version Status Build Status Documentation Status

provenance is a Python library for function-level caching and provenance that aids in creating Parsimonious Pythonic Pipelines™. By wrapping functions in the provenance decorator computed results are cached across various tiered stores (disk, S3, SFTP) and provenance (i.e. lineage) information is tracked and stored in an artifact repository. A central artifact repository can be used to enable production pipelines, team collaboration, and reproducible results. The library is general purpose but was built with machine learning pipelines in mind. By leveraging the fantastic joblib library object serialization is optimized for numpy and other PyData libraries.

What that means in practice is that you can easily keep track of how artifacts (models, features, or any object or file) are created, where they are used, and have a central place to store and share these artifacts. This basic plumbing is required (or at least desired!) in any machine learning pipeline and project. provenance can be used standalone along with a build server to run pipelines or in conjunction with more advanced workflow systems (e.g. Airflow, Luigi).

Example

For an explanation of this example please see the Introductory Guide.

import provenance as p

p.load_config(...)

import time

@p.provenance()
def expensive_add(a, b):
    time.sleep(2)
    return a + b


@p.provenance()
def expensive_mult(a, b):
    time.sleep(2)
    return a * b


a1 = expensive_add(4, 3)
a2 = expensive_add(1, 1)

result = expensive_mult(a1, a2)

vis.visualize_lineage(result)
https://raw.githubusercontent.com/bmabey/provenance/trunk/docs/source/images/lineage_example.png

Installation

For the base functionality:

pip install provenance

For the visualization module (which requires graphviz to be installed):

pip install provenance[vis]

For the SFTP store:

pip install provenance[sftp]

For everything all at once:

pip install provenance[all]

provenance is also available from conda-forge for conda installations:

conda install -c conda-forge provenance

Compatibility

provenance is currently only compatible with Python 3.5 and higher. Updating it to work with Python 2.7x should be easy, follow this ticket if you are interested in that.

Metadata

Release files for provenance 0.14.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 provenance 0.14.1
File Size Uploaded Provenance
provenance-0.14.1.tar.gz 59.7 kB Without provenance Details

Built distribution (wheel)

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

Total release size: 104.3 kB

Release files / provenance-0.14.1.tar.gz

Download URL provenance-0.14.1.tar.gz
Size 59.7 kB
Tags Source
SHA-256 checksum
How to use checksums
873f716e1e1a2b8550200bb9cd643460cc479144bceabcb42209bb3b1f8583d0
BLAKE2b-256 checksum
How to use checksums
dfc315bb4959dd1ec05a7a1b0666881f66276988bad5d9815c6b1bd11a63991c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.0 requests/2.22.0 setuptools/45.2.0.post20200210 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

Release files / provenance-0.14.1-py3-none-any.whl

Download URL provenance-0.14.1-py3-none-any.whl
Size 44.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6025b5a33a1a55b847e007034660b845fd04006067ef2089cd4c64da0faf49d8
BLAKE2b-256 checksum
How to use checksums
9ec4841bfd9967ba2ebc38582c77ec2aa788c4b255af73178519105bae0be568
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.0 requests/2.22.0 setuptools/45.2.0.post20200210 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

Security for provenance 0.14.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