Skip to main content

Microsoft Azure Purview Workflow Service Client Library for Python

Project description

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.list_workflows()
    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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

azure-purview-workflow-1.0.0b1.zip (68.9 kB view details)

Uploaded Source

Built Distribution

azure_purview_workflow-1.0.0b1-py3-none-any.whl (49.4 kB view details)

Uploaded Python 3

File details

Details for the file azure-purview-workflow-1.0.0b1.zip.

File metadata

  • Download URL: azure-purview-workflow-1.0.0b1.zip
  • Upload date:
  • Size: 68.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.28.2 setuptools/58.1.0 requests-toolbelt/0.10.1 tqdm/4.64.1 CPython/3.9.16

File hashes

Hashes for azure-purview-workflow-1.0.0b1.zip
Algorithm Hash digest
SHA256 e55559a414e80b4e196ff3295b2c7ad2a2bbbb6502156631512297b7f694beb4
MD5 d904b5da27d5d0014fc9834cc5b751d8
BLAKE2b-256 900f777d9aa8053718c9577e339eb30431f87262e53deb7f8168e3f953937368

See more details on using hashes here.

File details

Details for the file azure_purview_workflow-1.0.0b1-py3-none-any.whl.

File metadata

  • Download URL: azure_purview_workflow-1.0.0b1-py3-none-any.whl
  • Upload date:
  • Size: 49.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.28.2 setuptools/58.1.0 requests-toolbelt/0.10.1 tqdm/4.64.1 CPython/3.9.16

File hashes

Hashes for azure_purview_workflow-1.0.0b1-py3-none-any.whl
Algorithm Hash digest
SHA256 b27c7c704cc4529b3f373a814a080cd28ad64470ce4fdb9b24deef4436892a8d
MD5 045231c6fe700845ef3ce40c93f24c05
BLAKE2b-256 c0b325043e3c916be41d5d1fb61292d2ee311b642dba78579030fefbacb4919a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page