Skip to content

prefect-soda-cloud

PyPI

Collection of Prefect tasks to interact with Soda Cloud APIs.

Resources

For more tips on how to use tasks and flows in a Collection, check out Using Collections!

Installation

Install prefect-soda-cloud with pip:

pip install prefect-soda-cloud

Requires an installation of Python 3.8+.

We recommend using a Python virtual environment manager such as pipenv, conda or virtualenv.

These tasks are designed to work with Prefect 2.0. For more information about how to use Prefect, please refer to the Prefect documentation.

Examples

Note, to use the load method on Blocks, you must already have a block document saved through code or saved through the UI.

Below is an example on saving block documents through code.

save_soda_cloud_credentials_as_block.py
from prefect_soda_cloud import SodaCloudCredentials

SodaCloudCredentials(
    user_or_api_key_id="<username or API key ID>",
    pwd_or_api_key_secret="<password or API key secret>"
).save("your_block_fancy_name")
save_soda_cloud_auth_config_as_block.py
from prefect_soda_cloud import SodaCloudAuthConfig, SodaCloudCredentials

# Assuming you have already registered your Soda Cloud credentials in a block, you can load it
creds = SodaCloudCredentials.load("your_block_fancy_name")

SodaCloudAuthConfig(
    api_base_url="https://cloud.soda.io",
    creds=creds
).save("another_fancy_name")

Registering blocks

Register blocks in this module to view and edit them on Prefect Cloud:

prefect block register -m prefect_soda_cloud

A list of available blocks in prefect-soda-cloud and their setup instructions can be found here.

Feedback

If you encounter any bugs while using prefect-soda-cloud, feel free to open an issue in the prefect-soda-cloud repository.

If you have any questions or issues while using prefect-soda-cloud, you can find help in either the Prefect Discourse forum or the Prefect Slack community.

Feel free to star or watch prefect-soda-cloud for updates too!

Contributing

If you'd like to help contribute to fix an issue or add a feature to prefect-soda-cloud, please propose changes through a pull request from a fork of the repository.

Here are the steps:

  1. Fork the repository
  2. Clone the forked repository
  3. Install the repository and its dependencies:
    pip install -e ".[dev]"
    
  4. Make desired changes
  5. Add tests
  6. Insert an entry to CHANGELOG.md
  7. Install pre-commit to perform quality checks prior to commit:
    pre-commit install
    
  8. git commit, git push, and create a pull request