Dagster Hex Integration
Installation
To install the library, use pip alongside your existing Dagster environment.
pip install dagster-hex
Usage
Create a HexResource specifying the api_key, then, use that resource in our assets.
import os
import dagster as dg
from dagster_hex.resources import HexResource
@dg.asset
def custom_hex_asset(
context: dg.AssetExecutionContext,
hex: HexResource
) -> dg.MaterializeResult:
project_id = "abcdefgh-1234-abcd-1234-abcdefghijkl"
context.log.info(f"Running Hex project {project_id}")
response = hex.run_project(
project_id,
inputs={
"message": "Hello, World!"
}
)
return dg.MaterializeResult(
metadata={
"data": response.get("data")
}
)
defs = Definitions(
assets=[custom_hex_asset],
resources={
"hex": HexResource(
api_key=dg.EnvVar("HEX_API_KEY")
)
}
)
Legacy
Ops
The hex_project_op will call the Hex API to run a project until it completes.
import os
import dagster as dg
from dagster_hex.ops import hex_project_op
from dagster_hex.resources import hex_resource
hex_resource = HexResource(
api_key=dg.EnvVar("HEX_API_KEY")
)
run_hex_op = hex_project_op.configured({
"name": "run_hex_project_op",
"project_id": "abcdefgh-1234-abcd-1234-abcdefghijkl"
})
@job(resource_defs={"hex": my_resource})
def hex_job():
run_hex_op()
Asset Materializations
Ops will return an AssetMaterialization with the following keys:
run_url
run_status_url
trace_id
run_id
elapsed_time
notifications
Metadata
Release files for dagster-hex 0.1.10
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 |
|---|---|---|---|---|
| dagster_hex-0.1.10.tar.gz | 8.4 kB | Without provenance | Details for dagster_hex-0.1.10.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| dagster_hex-0.1.10-py3-none-any.whl | Python 3 | none | any | Details for dagster_hex-0.1.10-py3-none-any.whl |
Total release size: 17.6 kB
Release files / dagster_hex-0.1.10.tar.gz
| Download URL | dagster_hex-0.1.10.tar.gz |
|---|---|
| Size | 8.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fe7f33f5339ceecb7a3fb88f1bbc35ece3181a4740f625a83f3ee6624aa7727d
|
|
BLAKE2b-256 checksum How to use checksums |
e08ff82eb7456fb25eb278036d7e6cded8496d394edcaeb789c7cf685010c079
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / dagster_hex-0.1.10-py3-none-any.whl
| Download URL | dagster_hex-0.1.10-py3-none-any.whl |
|---|---|
| Size | 9.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
78ae8b2eae1926b9483e21c65a8af0a5f666080cc80629dd067bf988d4786b2d
|
|
BLAKE2b-256 checksum How to use checksums |
dfed76ab17eb3f3ca923e34970dbb8e4211cef9abb02684764f9594a20ee51da
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for dagster-hex 0.1.10
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.