Hamilton SDK for reading and writing to the Hamilton backend APIs that support the UI.
Project description
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 "sf-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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file sf_hamilton_sdk-0.8.0.tar.gz
.
File metadata
- Download URL: sf_hamilton_sdk-0.8.0.tar.gz
- Upload date:
- Size: 248.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 72834bced37b77d57106f1f4f938293b5170387136ce99c9ed66988709eec06a |
|
MD5 | 4f276bc56a2c4127b132de8806b8f683 |
|
BLAKE2b-256 | 97eaf5e8558453378970fd77ddc08086c26bf1aefc80f181005eb04c63d97dc3 |
File details
Details for the file sf_hamilton_sdk-0.8.0-py3-none-any.whl
.
File metadata
- Download URL: sf_hamilton_sdk-0.8.0-py3-none-any.whl
- Upload date:
- Size: 258.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 57459efd2684d15f1385acdca27583935cd4e5a0eba62b0161a7483481c0a520 |
|
MD5 | 9a84ccd27eae491f985c12c58c234ea0 |
|
BLAKE2b-256 | 5af4b09b195adbb3c511c0e0eb816cc2555addefa5135d098609ae9043301a57 |