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.24.0.tar.gz (61.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

provenaclient-0.24.0-py3-none-any.whl (84.6 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for provenaclient-0.24.0.tar.gz
Algorithm Hash digest
SHA256 dc908ac320bd52d23528fdeeccef0fa7167659c31902727acd1ae09f8ccacfe7
MD5 60ae886876f03f03293f8f20dfe6770a
BLAKE2b-256 633173ed73055775f9af9c504c8071ffca179191d44e99115fb3a837957ec4b1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: provenaclient-0.24.0-py3-none-any.whl
  • Upload date:
  • Size: 84.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.9

File hashes

Hashes for provenaclient-0.24.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ba9a724e798d1cd8e57c2199a2bd23973206584ec441f3a2036ce62621c63325
MD5 b2d4a2d9ae6891ee7097aa2408e6ebca
BLAKE2b-256 4c70462faefbad2847b8a2e69442b4f9e448adf6d2d90667cb148777dad389d8

See more details on using hashes here.

Supported by

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