Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

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

Getting started

Prequisites

Authentication

To authenticate with AAD, you must first pip install azure-identity

After setup, you can choose which type of credential from azure.identity to use. For Workflow service, it is recommended that use the UsernamePasswordCredential 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:

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

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. For more information, see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

Metadata

Release files for azure-purview-workflow 1.0.0b2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for azure-purview-workflow 1.0.0b2
File Size Uploaded
azure-purview-workflow-1.0.0b2.tar.gz 50.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for azure-purview-workflow 1.0.0b2
File Interpreter ABI Platform
azure_purview_workflow-1.0.0b2-py3-none-any.whl Python 3 none any Details

Total release size: 103.6 kB

Release files / azure-purview-workflow-1.0.0b2.tar.gz

Download URL azure-purview-workflow-1.0.0b2.tar.gz
Size 50.8 kB
Tags Source
SHA-256 checksum
How to use checksums
4ae589ee33ba310662d6d88568c352e732b1fc404bda2aff93a5688e67f79c56
BLAKE2b-256 checksum
How to use checksums
8a1e11ded161f6a3fd2d16b8f7ad21ac9bd50b24f3bd007bbe90ffe1d481e2dc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via RestSharp/106.13.0.0

Release files / azure_purview_workflow-1.0.0b2-py3-none-any.whl

Download URL azure_purview_workflow-1.0.0b2-py3-none-any.whl
Size 52.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e6fa2c331bb148c17f18885f997431abb823d1a616f98869fcc2bead35e9084c
BLAKE2b-256 checksum
How to use checksums
1414d623b4d94047dc28933b31a17d0341a9ca352b4a0c5c26080d85f1546761
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via RestSharp/106.13.0.0

Release history Release notifications | RSS feed

This release

1.0.0b2 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page