# DAGWorks Platform SDK: Client Code & Related
Welcome to using the DAGWorks Platform!
Here are instructions on how to get started with tracking, and managing your Hamilton
DAGs with the DAGWorks Platform.
## Getting Started
For the latest documentation, please consult our
[DAGWorks Platform documentation](https://docs.dagworks.io/).
For a quick overview of Hamilton, we suggest [tryhamilton.dev](https://www.tryhamilton.dev/).
## Using the DAGWorks Driver
First, you'll need to install the DAGWorks SDK package. Assuming you're using pip, you
can do this with:
```bash
# install the package & cli into your favorite python environment.
pip install dagworks-sdk
# And validate -- this should not error.
python -c "from dagworks import driver"
```
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 dagworks import driver
...
dr = driver.Driver(
your_config, # standard hamilton config
*your_modules, # standard hamilton modules
adapter=your_adapter, # Optional. Standard hamilton adapter.
# Note: Ray, Dask, Spark are not supported yet.
project_id=1, # The ID of your project. Create one in the UI first if you don't have one.
api_key="safely_load_your_api_key", # e.g. os.environ["DAGWORKS_API_KEY"]
username="your_email_address",
dag_name="name_of_your_dag",
tags={"tag1": "value1", "tag2": "value2"}, # Optional
)
```
*Project ID*: You'll need a project ID. Grab one from https://app.dagworks.io/dashboard/projects.
Create a project if you don't have one, and take the ID from that.
*API Key*: You'll need an API key. Create one here https://app.dagworks.io/dashboard/settings.
*username*: This is the email address you used to sign up for the DAGWorks Platform.
*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
DAGWorks Platform. Visit https://app.dagworks.io/dashboard/projects to see your projects & DAGs.
## Starter Projects
There are several starter projects that you can use to get started with the DAGWorks Platform.
Starter Projects:
* hello_world: a simple hello world DAG.
* data_processing: a simple data processing DAG, pulling from CSVs and normalizing the data.
* machine_learning: a simple machine learning DAG using the iris dataset.
* time_series_feature_engineering: a simple time series feature engineering DAG.
To use the starter project, run the dagworks CLI:
```bash
dagworks init \
--api-key API_KEY_HERE \
--username EMAIL_HERE \
--project-id PROJECT_ID_FROM_DAGWORKS_PLATFORM \
--template STARTER_PROJECT_NAME \
--location LOCATION
```
Where:
* *API_KEY_HERE*: is your DAGWorks Platform API Key. Create one here
https://app.dagworks.io/dashboard/settings.
* *EMAIL_HERE*: is the email address you signed up for the DAGWorks Platform with.
* *PROJECT_ID_FROM_DAGWORKS_PLATFORM*: is the project ID you want to use. Create one here
https://app.dagworks.io/dashboard/projects.
* *STARTER_PROJECT_NAME*: is the name of the starter project you want to use. Your options
are hello_world, data_processing, machine_learning, time_series_feature_engineering.
* *LOCATION*: is the location you want to create the project in. This is a local directory.
# License
The use of this software is governed by the "The DAGWorks Enterprise license".
Email support@dagworks.io for more information.
Raw data
{
"_id": null,
"home_page": null,
"name": "dagworks-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/08/14/ed183e35f16896f5387448c8ff590d506792ef7280cb90e5e90bb5fca02b/dagworks_sdk-0.6.1.tar.gz",
"platform": null,
"description": "# DAGWorks Platform SDK: Client Code & Related\n\nWelcome to using the DAGWorks Platform!\n\nHere are instructions on how to get started with tracking, and managing your Hamilton\nDAGs with the DAGWorks Platform.\n\n## Getting Started\n\nFor the latest documentation, please consult our\n[DAGWorks Platform documentation](https://docs.dagworks.io/).\n\nFor a quick overview of Hamilton, we suggest [tryhamilton.dev](https://www.tryhamilton.dev/).\n\n## Using the DAGWorks Driver\n\nFirst, you'll need to install the DAGWorks 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 dagworks-sdk\n\n# And validate -- this should not error.\npython -c \"from dagworks import driver\"\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 dagworks import driver\n\n...\ndr = driver.Driver(\n your_config, # standard hamilton config\n *your_modules, # standard hamilton modules\n adapter=your_adapter, # Optional. Standard hamilton adapter.\n # Note: Ray, Dask, Spark are not supported yet.\n project_id=1, # The ID of your project. Create one in the UI first if you don't have one.\n api_key=\"safely_load_your_api_key\", # e.g. os.environ[\"DAGWORKS_API_KEY\"]\n username=\"your_email_address\",\n dag_name=\"name_of_your_dag\",\n tags={\"tag1\": \"value1\", \"tag2\": \"value2\"}, # Optional\n)\n```\n*Project ID*: You'll need a project ID. Grab one from https://app.dagworks.io/dashboard/projects.\nCreate a project if you don't have one, and take the ID from that.\n\n*API Key*: You'll need an API key. Create one here https://app.dagworks.io/dashboard/settings.\n\n*username*: This is the email address you used to sign up for the DAGWorks Platform.\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\nDAGWorks Platform. Visit https://app.dagworks.io/dashboard/projects to see your projects & DAGs.\n\n## Starter Projects\nThere are several starter projects that you can use to get started with the DAGWorks Platform.\n\nStarter Projects:\n\n* hello_world: a simple hello world DAG.\n* data_processing: a simple data processing DAG, pulling from CSVs and normalizing the data.\n* machine_learning: a simple machine learning DAG using the iris dataset.\n* time_series_feature_engineering: a simple time series feature engineering DAG.\n\nTo use the starter project, run the dagworks CLI:\n\n```bash\ndagworks init \\\n --api-key API_KEY_HERE \\\n --username EMAIL_HERE \\\n --project-id PROJECT_ID_FROM_DAGWORKS_PLATFORM \\\n --template STARTER_PROJECT_NAME \\\n --location LOCATION\n```\nWhere:\n\n* *API_KEY_HERE*: is your DAGWorks Platform API Key. Create one here\nhttps://app.dagworks.io/dashboard/settings.\n* *EMAIL_HERE*: is the email address you signed up for the DAGWorks Platform with.\n* *PROJECT_ID_FROM_DAGWORKS_PLATFORM*: is the project ID you want to use. Create one here\nhttps://app.dagworks.io/dashboard/projects.\n* *STARTER_PROJECT_NAME*: is the name of the starter project you want to use. Your options\nare hello_world, data_processing, machine_learning, time_series_feature_engineering.\n* *LOCATION*: is the location you want to create the project in. This is a local directory.\n\n# License\nThe use of this software is governed by the \"The DAGWorks Enterprise license\".\nEmail support@dagworks.io for more information.\n",
"bugtrack_url": null,
"license": null,
"summary": "DAGWorks SDK.",
"version": "0.6.1",
"project_urls": {
"Bug Reports": "https://docs.google.com/forms/d/e/1FAIpQLScS9YvcuNOTretZWXUdur8XNcJPpkJwZwzxuGfbPJKc8IRS6A/viewform",
"Documenation": "https://docs.dagworks.io/",
"Homepage": "https://www.dagworks.io",
"Source": "https://github.com/dagworks-inc/dagworks-sdk/"
},
"split_keywords": [
"hamilton",
" dagworks",
" observability"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "7af5019b7631f9b7651fcd9696c2fb31f809435781711118aa2c29d8b1c3d545",
"md5": "7e2f42c899ce0ffd4fc84a9102cde01f",
"sha256": "e02de8297cec16719f135ddb5b93977d4ed6e107070d6224d4f197648d18bb41"
},
"downloads": -1,
"filename": "dagworks_sdk-0.6.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "7e2f42c899ce0ffd4fc84a9102cde01f",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4,>=3.7",
"size": 260669,
"upload_time": "2024-07-18T23:54:20",
"upload_time_iso_8601": "2024-07-18T23:54:20.329774Z",
"url": "https://files.pythonhosted.org/packages/7a/f5/019b7631f9b7651fcd9696c2fb31f809435781711118aa2c29d8b1c3d545/dagworks_sdk-0.6.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "0814ed183e35f16896f5387448c8ff590d506792ef7280cb90e5e90bb5fca02b",
"md5": "5a2ed38cd01928c8b11da3f4146b2ee9",
"sha256": "401086a0750f79b28c5a5e0e914bc47e6186086a96cf3f6da8ab37da052e91ed"
},
"downloads": -1,
"filename": "dagworks_sdk-0.6.1.tar.gz",
"has_sig": false,
"md5_digest": "5a2ed38cd01928c8b11da3f4146b2ee9",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4,>=3.7",
"size": 245520,
"upload_time": "2024-07-18T23:54:22",
"upload_time_iso_8601": "2024-07-18T23:54:22.424359Z",
"url": "https://files.pythonhosted.org/packages/08/14/ed183e35f16896f5387448c8ff590d506792ef7280cb90e5e90bb5fca02b/dagworks_sdk-0.6.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-07-18 23:54:22",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "dagworks-inc",
"github_project": "dagworks-sdk",
"github_not_found": true,
"lcname": "dagworks-sdk"
}