Hex Airflow Provider
Provides an Airflow Operator and Hook to trigger Hex project runs.
This Airflow Provider Package provides Hooks and Operators for interacting with the Hex API.
Requirements
- Airflow >=2.2
- Hex API Token
Initial Setup
Install the package.
pip install airflow-provider-hex
After creating a Hex API token, set up your Airflow Connection Credentials in the Airflow UI.
- Connection ID:
hex_default - Connection Type:
Hex Connection - Host:
https://app.hex.tech - Hex API Token:
your-token-here
Operators
The airflow_provider_hex.operators.hex.HexRunProjectOperator
Operator runs Hex Projects, either synchronously or asynchronously.
In the synchronous mode, the Operator will start a Hex Project run and then poll the run until either an error or success status is returned, or until the poll timeout. If the timeout occurs, the default behaviour is to attempt to cancel the run.
In the asynchronous mode, the Operator will request that a Hex Project is run, but will not poll for completion. This can be useful for long-running projects.
The operator accepts inputs in the form of a dictionary. These can be used to override existing input elements in your Hex project.
You may also optionally include notifications for a particular run. See the Hex API documentation for details.
Hooks
The airflow_provider_hex.hooks.hex.HexHook
provides a low-level interface to the Hex API.
These can be useful for testing and development, as they provide both a generic
run method which sends an authenticated request to the Hex API, as well as
implementations of the run method that provide access to specific endpoints.
Examples
A simplified example DAG demonstrates how to use the Airflow Operator
from airflow_provider_hex.operators.hex import HexRunProjectOperator
PROJ_ID = 'abcdef-ghijkl-mnopq'
notifications: list[NotificationDetails] = [
{
"type": "SUCCESS",
"includeSuccessScreenshot": True,
"slackChannelIds": ["HEX666SQG"],
"userIds": [],
"groupIds": [],
}
]
...
sync_run = HexRunProjectOperator(
task_id="run",
hex_conn_id="hex_default",
project_id=PROJ_ID,
dag=dag,
notifications=notifications
)
Metadata
Release files for airflow-provider-hex 0.1.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| airflow-provider-hex-0.1.9.tar.gz | 8.8 kB | Without provenance | Details for airflow-provider-hex-0.1.9.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| airflow_provider_hex-0.1.9-py3-none-any.whl | Python 3 | none | any | Details for airflow_provider_hex-0.1.9-py3-none-any.whl |
Total release size: 17.1 kB
Release files / airflow-provider-hex-0.1.9.tar.gz
| Download URL | airflow-provider-hex-0.1.9.tar.gz |
|---|---|
| Size | 8.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
299d505d62417f75660179b35a44d22031d2c8a7bc893fe62b0fa42f4755cf81
|
|
BLAKE2b-256 checksum How to use checksums |
5cbadba3d4c64039185022538b8a0f534f4429917391809bc86ff7427094b14a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.2
|
Release files / airflow_provider_hex-0.1.9-py3-none-any.whl
| Download URL | airflow_provider_hex-0.1.9-py3-none-any.whl |
|---|---|
| Size | 8.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2d5f6cf30f49979b1ef522a65135cd7565fd1a1c47c2b91f35b951408d59e66d
|
|
BLAKE2b-256 checksum How to use checksums |
d6c148965381973d97f1292d6c4173458603b71584f8a7c0f3ba432a58c3468a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.2
|
Security for airflow-provider-hex 0.1.9
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.