Skip to main content

A client library for interfacing with a Provena instance.

Project description

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)

Contact Information

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

Contributing:

Refer to the following doc Contributing Guidelines

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

Project details


Download files

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

Source Distribution

provenaclient-0.21.0.tar.gz (60.9 kB view details)

Uploaded Source

Built Distribution

provenaclient-0.21.0-py3-none-any.whl (82.5 kB view details)

Uploaded Python 3

File details

Details for the file provenaclient-0.21.0.tar.gz.

File metadata

  • Download URL: provenaclient-0.21.0.tar.gz
  • Upload date:
  • Size: 60.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for provenaclient-0.21.0.tar.gz
Algorithm Hash digest
SHA256 a43fd56c70c42ad1490c91dba39beec468c56f3a5798d52f1fbc66c736f76f22
MD5 598c0253ee38aa90bb8ea07ef3423e67
BLAKE2b-256 0ab62e18ca8b1052ed3fdb86af565a152205a45acaad448c3e03c9a7e8da5af4

See more details on using hashes here.

File details

Details for the file provenaclient-0.21.0-py3-none-any.whl.

File metadata

File hashes

Hashes for provenaclient-0.21.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4bd17f9060f12790677b80fa7704f9022215dac469cbb0c11d11acbccf1385bc
MD5 92b4349ff3c0622ed8b921be983d0d75
BLAKE2b-256 31715b43b23effeaf7b2dddd628c990eb6cc2c796de7002ece44fc37a34a44f1

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page