Skip to main content

Hamilton UI SDK: Client Code & Related

Welcome to using the Hamilton UI!

Here are instructions on how to get started with tracking, and managing your Hamilton DAGs with the Hamilton UI.

Getting Started

For the latest documentation, please consult our Hamilton documentation under Hamilton UI.

For a quick overview of Hamilton, we suggest tryhamilton.dev.

Using the HamiltonTracker

First, you'll need to install the Hamilton SDK package. Assuming you're using pip, you can do this with:

# install the package & cli into your favorite python environment.
pip install hamilton-sdk

# And validate -- this should not error.
python -c "from hamilton_sdk import adapters"

Next, you'll need to modify your Hamilton driver. You'll only need to use one line of code to replace your driver with ours:

from hamilton_sdk import adapters
from hamilton import driver

tracker = adapters.HamiltonTracker(
   project_id=PROJECT_ID,  # modify this as needed
   username=YOUR_EMAIL, # modify this as needed
   dag_name="my_version_of_the_dag",
   tags={"environment": "DEV", "team": "MY_TEAM", "version": "X"}
)
dr = (
  driver.Builder()
    .with_config(your_config)
    .with_modules(*your_modules)
    .with_adapters(tracker)
    .build()
)
# to run call .execute() or .materialize() on the driver

Project ID: You'll need a project ID. Create a project if you don't have one, and take the ID from that.

username: This is the email address you used to set up the Hamilton UI.

dag_name: for a project, the DAG name is the top level way to group DAGs. E.g. ltv_model, us_sales, etc.

tags: these are optional are string key value paris. They allow you to filter and curate various DAG runs.

Then run Hamilton as normal! Each DAG run will be tracked, and you'll have access to it in the Hamilton UI. After spinning up the Hamilton UI application, visit it to see your projects & DAGs.

License

The code here is licensed under the BSD-3 Clear Clause license. See the main repository LICENSE for details.

Metadata

Release files for dw-hamilton-sdk 0.3.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dw-hamilton-sdk 0.3.2
File Size Uploaded
dw_hamilton_sdk-0.3.2.tar.gz 240.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for dw-hamilton-sdk 0.3.2
File Interpreter ABI Platform
dw_hamilton_sdk-0.3.2-py3-none-any.whl Python 3 none any Details

Total release size: 489.1 kB

Release files / dw_hamilton_sdk-0.3.2.tar.gz

Download URL dw_hamilton_sdk-0.3.2.tar.gz
Size 240.1 kB
Tags Source
SHA-256 checksum
How to use checksums
b073011605998efe79834b580a62e36f5496447df364b908cbff63767bd5d780
BLAKE2b-256 checksum
How to use checksums
a9b8a21dab4294f732711c74d88f171cb400573649bb6d8f14410a199b315895
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.13

Release files / dw_hamilton_sdk-0.3.2-py3-none-any.whl

Download URL dw_hamilton_sdk-0.3.2-py3-none-any.whl
Size 249.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
48740900e74edf14d5030c473ad9e834c440a1941002554f5d27dec4313caa7c
BLAKE2b-256 checksum
How to use checksums
9a0219b65febbb0e8804ab257fec5a1ab02f18cc83e14506b16f6a6ebabc49fb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.13

Release history Release notifications | RSS feed

This release

0.3.2 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page