Skip to content

prefect-hex


Welcome!

Prefect integrations for interacting with Hex.

Hex is a powerful platform for collaborative data science and analytics. For information getting started with Hex, check out Hex's quickstart guide.

The tasks within this collection were created by a code generator using Hex's OpenAPI spec.

Hex's REST API documentation can be found here.

Getting Started

Python setup

Requires an installation of Python 3.7+.

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.

Installation

Install prefect-hex with pip:

pip install prefect-hex

Write and run a flow

from prefect import flow
from prefect_hex import HexCredentials

from prefect_hex.project import get_project_runs

@flow
def get_project_runs_flow():
    hex_credentials = HexCredentials(token="a1b2c3d4")
    project_runs = get_project_runs(
        project_id='5a8591dd-4039-49df-9202-96385ba3eff8',
        hex_credentials=hex_credentials
    )
    return project_runs

get_project_runs_flow()

Resources

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

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

Development

If you'd like to install a version of prefect-hex for development, clone the repository and perform an editable install with pip:

git clone https://github.com/PrefectHQ/prefect-hex.git

cd prefect-hex/

pip install -e ".[dev]"

# Install linting pre-commit hooks
pre-commit install