# Azure Purview Workflow Service client library for Python
Workflows are automated, repeatable business processes that users can create within Microsoft Purview to validate and orchestrate CUD (create, update, delete) operations on their data entities. Enabling these processes allow organizations to track changes, enforce policy compliance, and ensure quality data across their data landscape.
Use the client library for Purview Workflow to:
- Manage workflows
- Submit user requests and monitor workflow runs
- View and respond to workflow tasks
For more details about how to use workflow, please refer to the [service documentation][product_documentation]
## Getting started
### Prequisites
- Python 3.7 or later is required to use this package.
- You need an [Azure subscription][azure_sub] to use this package.
- An existing Azure [Purview account][purview_resource].
### Authentication
To authenticate with AAD, you must first [pip][pip] install [`azure-identity`][azure_identity_pip]
After setup, you can choose which type of [credential][azure_identity_credentials] from azure.identity to use.
For Workflow service, it is recommended that use the [UsernamePasswordCredential][username_password_credential] to authenticate the client:
Set the values of client ID and tenant ID of the AAD application, set the values username and password of the AAD user as environment variables:
`AZURE_CLIENT_ID`, `AZURE_TENANT_ID`, `USERNAME` and `PASSWORD`
Use the returned token credential to authenticate the client:
```python
from azure.purview.workflow import PurviewWorkflowClient
from azure.identity import UsernamePasswordCredential
username = os.getenv("USERNAME")
password = os.getenv("PASSWORD")
client_id = os.getenv("AZURE_CLIENT_ID")
tenant_id = os.getenv("AZURE_TENANT_ID")
credential = UsernamePasswordCredential(client_id=client_id, username=username, password=password, tenant_id=tenant_id)
client = PurviewWorkflowClient(endpoint='<endpoint>', credential=credential)
```
## Examples
The following section shows you how to initialize and authenticate your client, then list all workflows.
- [List All Workflows](#list-all-workflows "List All Workflows")
### List All Workflows
```python
from azure.purview.workflow import PurviewWorkflowClient
from azure.identity import UsernamePasswordCredential
username = os.getenv("USERNAME")
password = os.getenv("PASSWORD")
client_id = os.getenv("AZURE_CLIENT_ID")
tenant_id = os.getenv("AZURE_TENANT_ID")
credential = UsernamePasswordCredential(client_id=client_id, username=username, password=password, tenant_id=tenant_id)
client = PurviewWorkflowClient(endpoint='<endpoint>', credential=credential)
try:
response = client.workflows.list()
for item in response:
print(item)
except HttpResponseError as e:
print('service responds error: {}'.format(e.response.json()))
```
## Key concepts
## Troubleshooting
## Contributing
## Next steps
This project welcomes contributions and suggestions. Most contributions require
you to agree to a Contributor License Agreement (CLA) declaring that you have
the right to, and actually do, grant us the rights to use your contribution.
For details, visit https://cla.microsoft.com.
When you submit a pull request, a CLA-bot will automatically determine whether
you need to provide a CLA and decorate the PR appropriately (e.g., label,
comment). Simply follow the instructions provided by the bot. You will only
need to do this once across all repos using our CLA.
This project has adopted the
[Microsoft Open Source Code of Conduct][code_of_conduct]. For more information,
see the Code of Conduct FAQ or contact opencode@microsoft.com with any
additional questions or comments.
<!-- LINKS -->
[product_documentation]: https://learn.microsoft.com/azure/purview/concept-workflow
[purview_resource]: https://docs.microsoft.com/azure/purview/create-catalog-portal
[azure_identity_credentials]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/identity/azure-identity#credentials
[username_password_credential]: https://learn.microsoft.com/python/api/azure-identity/azure.identity.usernamepasswordcredential?view=azure-python
[azure_sub]: https://azure.microsoft.com/free/
[code_of_conduct]: https://opensource.microsoft.com/codeofconduct/
[azure_identity_pip]: https://pypi.org/project/azure-identity/
[pip]: https://pypi.org/project/pip/
Raw data
{
"_id": null,
"home_page": "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk",
"name": "azure-purview-workflow",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": null,
"keywords": "azure,azure sdk",
"author": "Microsoft Corporation",
"author_email": "azpysdkhelp@microsoft.com",
"download_url": "https://files.pythonhosted.org/packages/8a/1e/11ded161f6a3fd2d16b8f7ad21ac9bd50b24f3bd007bbe90ffe1d481e2dc/azure-purview-workflow-1.0.0b2.tar.gz",
"platform": null,
"description": "# Azure Purview Workflow Service client library for Python\n\nWorkflows are automated, repeatable business processes that users can create within Microsoft Purview to validate and orchestrate CUD (create, update, delete) operations on their data entities. Enabling these processes allow organizations to track changes, enforce policy compliance, and ensure quality data across their data landscape.\n\nUse the client library for Purview Workflow to:\n\n- Manage workflows\n- Submit user requests and monitor workflow runs\n- View and respond to workflow tasks\n\nFor more details about how to use workflow, please refer to the [service documentation][product_documentation]\n\n## Getting started\n\n### Prequisites\n\n- Python 3.7 or later is required to use this package.\n- You need an [Azure subscription][azure_sub] to use this package.\n- An existing Azure [Purview account][purview_resource].\n \n### Authentication\n\nTo authenticate with AAD, you must first [pip][pip] install [`azure-identity`][azure_identity_pip]\n\nAfter setup, you can choose which type of [credential][azure_identity_credentials] from azure.identity to use.\nFor Workflow service, it is recommended that use the [UsernamePasswordCredential][username_password_credential] to authenticate the client:\n\nSet the values of client ID and tenant ID of the AAD application, set the values username and password of the AAD user as environment variables:\n`AZURE_CLIENT_ID`, `AZURE_TENANT_ID`, `USERNAME` and `PASSWORD`\n\nUse the returned token credential to authenticate the client:\n\n```python\nfrom azure.purview.workflow import PurviewWorkflowClient\nfrom azure.identity import UsernamePasswordCredential\nusername = os.getenv(\"USERNAME\")\npassword = os.getenv(\"PASSWORD\")\nclient_id = os.getenv(\"AZURE_CLIENT_ID\")\ntenant_id = os.getenv(\"AZURE_TENANT_ID\")\ncredential = UsernamePasswordCredential(client_id=client_id, username=username, password=password, tenant_id=tenant_id)\nclient = PurviewWorkflowClient(endpoint='<endpoint>', credential=credential)\n```\n\n## Examples\n\nThe following section shows you how to initialize and authenticate your client, then list all workflows.\n\n- [List All Workflows](#list-all-workflows \"List All Workflows\")\n\n### List All Workflows\n\n```python\nfrom azure.purview.workflow import PurviewWorkflowClient\nfrom azure.identity import UsernamePasswordCredential\nusername = os.getenv(\"USERNAME\")\npassword = os.getenv(\"PASSWORD\")\nclient_id = os.getenv(\"AZURE_CLIENT_ID\")\ntenant_id = os.getenv(\"AZURE_TENANT_ID\")\ncredential = UsernamePasswordCredential(client_id=client_id, username=username, password=password, tenant_id=tenant_id)\nclient = PurviewWorkflowClient(endpoint='<endpoint>', credential=credential)\ntry:\n response = client.workflows.list()\n for item in response:\n print(item)\nexcept HttpResponseError as e:\n print('service responds error: {}'.format(e.response.json()))\n```\n## Key concepts\n\n## Troubleshooting\n\n## Contributing\n\n## Next steps\n\nThis project welcomes contributions and suggestions. Most contributions require\nyou to agree to a Contributor License Agreement (CLA) declaring that you have\nthe right to, and actually do, grant us the rights to use your contribution.\nFor details, visit https://cla.microsoft.com.\n\nWhen you submit a pull request, a CLA-bot will automatically determine whether\nyou need to provide a CLA and decorate the PR appropriately (e.g., label,\ncomment). Simply follow the instructions provided by the bot. You will only\nneed to do this once across all repos using our CLA.\n\nThis project has adopted the\n[Microsoft Open Source Code of Conduct][code_of_conduct]. For more information,\nsee the Code of Conduct FAQ or contact opencode@microsoft.com with any\nadditional questions or comments.\n\n<!-- LINKS -->\n[product_documentation]: https://learn.microsoft.com/azure/purview/concept-workflow\n[purview_resource]: https://docs.microsoft.com/azure/purview/create-catalog-portal\n[azure_identity_credentials]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/identity/azure-identity#credentials\n[username_password_credential]: https://learn.microsoft.com/python/api/azure-identity/azure.identity.usernamepasswordcredential?view=azure-python\n[azure_sub]: https://azure.microsoft.com/free/\n[code_of_conduct]: https://opensource.microsoft.com/codeofconduct/\n[azure_identity_pip]: https://pypi.org/project/azure-identity/\n[pip]: https://pypi.org/project/pip/\n",
"bugtrack_url": null,
"license": "MIT License",
"summary": "Microsoft Azure Purview Workflow Service Client Library for Python",
"version": "1.0.0b2",
"project_urls": {
"Homepage": "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk"
},
"split_keywords": [
"azure",
"azure sdk"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "1414d623b4d94047dc28933b31a17d0341a9ca352b4a0c5c26080d85f1546761",
"md5": "81a25edc90db2cc573534ff4057734fb",
"sha256": "e6fa2c331bb148c17f18885f997431abb823d1a616f98869fcc2bead35e9084c"
},
"downloads": -1,
"filename": "azure_purview_workflow-1.0.0b2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "81a25edc90db2cc573534ff4057734fb",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 52843,
"upload_time": "2023-11-07T03:50:16",
"upload_time_iso_8601": "2023-11-07T03:50:16.351613Z",
"url": "https://files.pythonhosted.org/packages/14/14/d623b4d94047dc28933b31a17d0341a9ca352b4a0c5c26080d85f1546761/azure_purview_workflow-1.0.0b2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "8a1e11ded161f6a3fd2d16b8f7ad21ac9bd50b24f3bd007bbe90ffe1d481e2dc",
"md5": "07164e8add2b3677389880f6786da00b",
"sha256": "4ae589ee33ba310662d6d88568c352e732b1fc404bda2aff93a5688e67f79c56"
},
"downloads": -1,
"filename": "azure-purview-workflow-1.0.0b2.tar.gz",
"has_sig": false,
"md5_digest": "07164e8add2b3677389880f6786da00b",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 50773,
"upload_time": "2023-11-07T03:50:14",
"upload_time_iso_8601": "2023-11-07T03:50:14.734267Z",
"url": "https://files.pythonhosted.org/packages/8a/1e/11ded161f6a3fd2d16b8f7ad21ac9bd50b24f3bd007bbe90ffe1d481e2dc/azure-purview-workflow-1.0.0b2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-11-07 03:50:14",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Azure",
"github_project": "azure-sdk-for-python",
"travis_ci": false,
"coveralls": true,
"github_actions": true,
"lcname": "azure-purview-workflow"
}