Name | dw-hamilton-sdk JSON |
Version |
0.3.2
JSON |
| download |
home_page | None |
Summary | Hamilton SDK for reading and writing to the Hamilton backend APIs that support the UI. |
upload_time | 2024-04-22 04:59:37 |
maintainer | None |
docs_url | None |
author | None |
requires_python | <4,>=3.7 |
license | None |
keywords |
hamilton
dagworks
observability
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# 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](https://hamilton.dagworks.io/) under `Hamilton UI`.
For a quick overview of Hamilton, we suggest [tryhamilton.dev](https://www.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:
```bash
# 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:
```python
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](../../LICENSE) for details.
Raw data
{
"_id": null,
"home_page": null,
"name": "dw-hamilton-sdk",
"maintainer": null,
"docs_url": null,
"requires_python": "<4,>=3.7",
"maintainer_email": null,
"keywords": "hamilton, dagworks, observability",
"author": null,
"author_email": "Stefan Krawczyk <stefan@dagworks.io>, Elijah ben Izzy <elijah@dagworks.io>",
"download_url": "https://files.pythonhosted.org/packages/a9/b8/a21dab4294f732711c74d88f171cb400573649bb6d8f14410a199b315895/dw_hamilton_sdk-0.3.2.tar.gz",
"platform": null,
"description": "# Hamilton UI SDK: Client Code & Related\n\nWelcome to using the Hamilton UI!\n\nHere are instructions on how to get started with tracking, and managing your Hamilton\nDAGs with the Hamilton UI.\n\n## Getting Started\n\nFor the latest documentation, please consult our\n[Hamilton documentation](https://hamilton.dagworks.io/) under `Hamilton UI`.\n\nFor a quick overview of Hamilton, we suggest [tryhamilton.dev](https://www.tryhamilton.dev/).\n\n## Using the HamiltonTracker\n\nFirst, you'll need to install the Hamilton SDK package. Assuming you're using pip, you\ncan do this with:\n\n```bash\n# install the package & cli into your favorite python environment.\npip install hamilton-sdk\n\n# And validate -- this should not error.\npython -c \"from hamilton_sdk import adapters\"\n```\n\nNext, you'll need to modify your Hamilton driver. You'll only need to use one line of code to\nreplace your driver with ours:\n\n```python\nfrom hamilton_sdk import adapters\nfrom hamilton import driver\n\ntracker = adapters.HamiltonTracker(\n project_id=PROJECT_ID, # modify this as needed\n username=YOUR_EMAIL, # modify this as needed\n dag_name=\"my_version_of_the_dag\",\n tags={\"environment\": \"DEV\", \"team\": \"MY_TEAM\", \"version\": \"X\"}\n)\ndr = (\n driver.Builder()\n .with_config(your_config)\n .with_modules(*your_modules)\n .with_adapters(tracker)\n .build()\n)\n# to run call .execute() or .materialize() on the driver\n```\n*Project ID*: You'll need a project ID. Create a project if you don't have one, and take the ID from that.\n\n*username*: This is the email address you used to set up the Hamilton UI.\n\n*dag_name*: for a project, the DAG name is the top level way to group DAGs.\nE.g. ltv_model, us_sales, etc.\n\n*tags*: these are optional are string key value paris. They allow you to filter and curate\nvarious DAG runs.\n\nThen run Hamilton as normal! Each DAG run will be tracked, and you'll have access to it in the\nHamilton UI. After spinning up the Hamilton UI application, visit it to see your projects & DAGs.\n\n\n# License\nThe code here is licensed under the BSD-3 Clear Clause license. See the main repository [LICENSE](../../LICENSE) for details.\n",
"bugtrack_url": null,
"license": null,
"summary": "Hamilton SDK for reading and writing to the Hamilton backend APIs that support the UI.",
"version": "0.3.2",
"project_urls": {
"Bug Reports": "https://github.com/dagworks-inc/hamilton/issues",
"Documenation": "https://hamilton.dagworks.io/",
"Homepage": "https://github.com/dagworks-inc/hamilton/",
"Source": "https://github.com/dagworks-inc/hamilton/ui/sdk"
},
"split_keywords": [
"hamilton",
" dagworks",
" observability"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "9a0219b65febbb0e8804ab257fec5a1ab02f18cc83e14506b16f6a6ebabc49fb",
"md5": "8a61e131f2c4693ddf0f68054b9d5ded",
"sha256": "48740900e74edf14d5030c473ad9e834c440a1941002554f5d27dec4313caa7c"
},
"downloads": -1,
"filename": "dw_hamilton_sdk-0.3.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "8a61e131f2c4693ddf0f68054b9d5ded",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4,>=3.7",
"size": 248964,
"upload_time": "2024-04-22T04:59:35",
"upload_time_iso_8601": "2024-04-22T04:59:35.577905Z",
"url": "https://files.pythonhosted.org/packages/9a/02/19b65febbb0e8804ab257fec5a1ab02f18cc83e14506b16f6a6ebabc49fb/dw_hamilton_sdk-0.3.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "a9b8a21dab4294f732711c74d88f171cb400573649bb6d8f14410a199b315895",
"md5": "57784c351974c8c448c2bb0a39185bdb",
"sha256": "b073011605998efe79834b580a62e36f5496447df364b908cbff63767bd5d780"
},
"downloads": -1,
"filename": "dw_hamilton_sdk-0.3.2.tar.gz",
"has_sig": false,
"md5_digest": "57784c351974c8c448c2bb0a39185bdb",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4,>=3.7",
"size": 240124,
"upload_time": "2024-04-22T04:59:37",
"upload_time_iso_8601": "2024-04-22T04:59:37.797504Z",
"url": "https://files.pythonhosted.org/packages/a9/b8/a21dab4294f732711c74d88f171cb400573649bb6d8f14410a199b315895/dw_hamilton_sdk-0.3.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-04-22 04:59:37",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "dagworks-inc",
"github_project": "hamilton",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"circle": true,
"requirements": [],
"lcname": "dw-hamilton-sdk"
}