Skip to main content

Provena Python Client

Welcome to the Provena Python Client repository! This client library is a programmatic interface designed to interact seamlessly with your Provena instance. The client uses the same Pydantic models as the Provena API, ensuring a one-to-one typed interface with the API. This means that the models used in the client library directly correspond to those used by the API, providing consistency and ease of use. It allows you to replicate most functionalities of the Provena Web app through Python code, including fetching or minting datasets, creating items within the registry, and launching provenance workflows. With the Provena Python Client, you can achieve comprehensive interactions with only a few lines of code.

Getting Started

To install the Provena Python Client, simply use pip:

pip install provenaclient

Once you have successfully installed provenaclient, refer to the following notebook for examples on how to use the client. Example Notebook here at: Example Notebook.

To find more examples on how to use the client, refer to these collection of notebooks: Provena Notebook Repository

Testing

If you are interested in running any tests, please make sure to first clone this repository and then follow the below steps:

Unit Tests

The Provena Python Client includes unit tests that check functionality using real server interactions and mocked components using httpx_mock. Tests cover HTTP methods, error handling, and JSON parsing.

To run unit tests:

  1. Install dependencies from pyproject.toml.
  2. Run pytest test_unit.py in the test directory.

Integration Tests

The Provena Python Client includes integration tests that validate and assess the functioning of the client library and its interaction with Provena API's, focusing on dataset operations, entity searching, item fetching, and provenance lifecycle.

To run integration tests:

  1. Install dependencies from pyproject.toml.
  2. Set up necessary credentials in .env (contact Provena Development Team for setup).
  3. Run pytest test_integration.py in the test directory.

For detailed testing procedures, see the Testing Guide.

Documentation:

Find Provena Python Client documentation and API Reference at: (Provena Client Documentation)

Pydantic V2 Compatility

Due to delays in migration from Pydantic v1 to v2 in upstream repositories (provena-interfaces and provena, this client library uses a specialised version of the interfaces which is a slightly stripped down view of the main interfaces packaged, migrated to v2.

This repo is available here - provena/pydantic-v2-interfaces. It is installed via pypi under the package provena-interfaces-v2.

We will ensure that when Provena updates effect the interfaces, that this mirror repository reflect those changes, and prompt an updated version of this repo to target them.

Contact Information

Contact Provena Developers via https://www.csiro.au/en/contact

Contributing:

Refer to the following doc Contributing Guidelines

Citation

Cite as:

Baker, Peter; Kulkarni, Parth; Petridis, Ross; & Yu, Jonathan (2024): Provena Python Client v0.13.0. CSIRO. v1. Software. https://doi.org/10.25919/j8s8-tf97

Refer to this link for details of the software collection and other versions: https://data.csiro.au/collection/csiro%3A63257v1

License

provenaclient was created by Provena Development Team (CSIRO). Provena Development Team (CSIRO) retains all rights to the source and it may not be reproduced, distributed, or used to create derivative works.

Acknowledgements

The development of Provena Python Client was funded by Reef Restoration and Adaptation Program (RRAP), which is a partnership between the Australian Government’s Reef Trust and the Great Barrier Reef Foundation. Provena Python Client has been developed to support the Modelling and Decision Support (MDS) Subprogram (https://gbrrestoration.org/program/modelling-and-decision-support/).

People who contributed and developed Provena Python Client (ordered alphabetically):

  • Jonathan Yu
  • Parth Kulkarni
  • Peter Baker
  • Ross Petridis

Release files for provenaclient 0.29.5

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

Source distribution (sdist)

Source distribution for provenaclient 0.29.5
File Size Uploaded
provenaclient-0.29.5.tar.gz 64.0 kB Details

Built distribution (wheel)

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

Total release size: 150.8 kB

Release files / provenaclient-0.29.5.tar.gz

Download URL provenaclient-0.29.5.tar.gz
Size 64.0 kB
Tags Source
SHA-256 checksum
How to use checksums
0388d4b72a6f955ac2f183810918351ee96fc7d720dcf6a7f2755110cf544c8b
BLAKE2b-256 checksum
How to use checksums
1a64d0fa43b28b9b4d222959cc1ed65d6f1b193af6064744f13bf13dea90bd31
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / provenaclient-0.29.5-py3-none-any.whl

Download URL provenaclient-0.29.5-py3-none-any.whl
Size 86.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
524c942a35a60f928f175be950d544d064d8ec61bd62549bfed82c881dcd540b
BLAKE2b-256 checksum
How to use checksums
40c243f04a308afea2dc8256f596f74dc559cbeca227f0059f8ef738046a7b5b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Release history Release notifications | RSS feed

This release

0.29.5 This release

2 release files

0.29.1

2 release files

0.26.0

2 release files

0.25.0

2 release files

0.24.0

2 release files

0.23.0

2 release files

0.22.0

2 release files

0.14.0

2 release files

0.13.0

2 release files

0.11.2

2 release files

0.11.1

2 release files

0.11.0

2 release files

0.9.0

2 release files

0.8.0

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.2.0

2 release files

0.1.0

2 release files

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