sf-hamilton-sdk


Namesf-hamilton-sdk JSON
Version 0.8.0 PyPI version JSON
download
home_pageNone
SummaryHamilton SDK for reading and writing to the Hamilton backend APIs that support the UI.
upload_time2024-11-20 21:12:34
maintainerNone
docs_urlNone
authorNone
requires_python<4,>=3.7
licenseNone
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 &amp; 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 "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:

```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": "sf-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/97/ea/f5e8558453378970fd77ddc08086c26bf1aefc80f181005eb04c63d97dc3/sf_hamilton_sdk-0.8.0.tar.gz",
    "platform": null,
    "description": "# Hamilton UI SDK: Client Code &amp; 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 \"sf-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.8.0",
    "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": "5af4b09b195adbb3c511c0e0eb816cc2555addefa5135d098609ae9043301a57",
                "md5": "9a84ccd27eae491f985c12c58c234ea0",
                "sha256": "57459efd2684d15f1385acdca27583935cd4e5a0eba62b0161a7483481c0a520"
            },
            "downloads": -1,
            "filename": "sf_hamilton_sdk-0.8.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "9a84ccd27eae491f985c12c58c234ea0",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4,>=3.7",
            "size": 258343,
            "upload_time": "2024-11-20T21:12:32",
            "upload_time_iso_8601": "2024-11-20T21:12:32.160498Z",
            "url": "https://files.pythonhosted.org/packages/5a/f4/b09b195adbb3c511c0e0eb816cc2555addefa5135d098609ae9043301a57/sf_hamilton_sdk-0.8.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "97eaf5e8558453378970fd77ddc08086c26bf1aefc80f181005eb04c63d97dc3",
                "md5": "4f276bc56a2c4127b132de8806b8f683",
                "sha256": "72834bced37b77d57106f1f4f938293b5170387136ce99c9ed66988709eec06a"
            },
            "downloads": -1,
            "filename": "sf_hamilton_sdk-0.8.0.tar.gz",
            "has_sig": false,
            "md5_digest": "4f276bc56a2c4127b132de8806b8f683",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4,>=3.7",
            "size": 248326,
            "upload_time": "2024-11-20T21:12:34",
            "upload_time_iso_8601": "2024-11-20T21:12:34.160086Z",
            "url": "https://files.pythonhosted.org/packages/97/ea/f5e8558453378970fd77ddc08086c26bf1aefc80f181005eb04c63d97dc3/sf_hamilton_sdk-0.8.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-20 21:12:34",
    "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,
    "lcname": "sf-hamilton-sdk"
}
        
Elapsed time: 0.54746s