File: README.md

package info (click to toggle)
python-azure 20250603%2Bgit-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 851,724 kB
  • sloc: python: 7,362,925; ansic: 804; javascript: 287; makefile: 195; sh: 145; xml: 109
file content (63 lines) | stat: -rw-r--r-- 2,326 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
---
page_type: sample
languages:
- python
products:
# Including relevant stubs from https://review.learn.microsoft.com/help/platform/metadata-taxonomies#product
- azure
name: Azure.Purview.Sharing samples for python
description: Samples for the Azure.Purview.Sharing client library.
---

# Azure.Purview.Sharing Samples

The following are code samples that show common scenario operations with the Azure Purview client library.

* [sent_shares_examples.py](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/purview/azure-purview-sharing/samples/sent_shares_examples.py) - Examples of Sent Shares:
    * Create a share client
    * Create a sent share
    * Send a user invitation
    * Send a service invitation
    * Get a sent share
    * Get all sent shares
    * Delete a sent share
    * Get a sent share invitation
    * View sent invitations
    * Delete a sent share invitation

* [received_shares_examples.py](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/purview/azure-purview-sharing/samples/received_shares_examples.py) - Examples of Received Shares:
    * Create a share client
    * Get all detached received shares
    * Attach a received share
    * Get a received share
    * List attached received shares
    * Delete a received share

* [share_resources_examples.py](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/purview/azure-purview-sharing/samples/share_resources_examples.py) - Examples of Share Resources:
    * List Share Resources

## Prerequisites
* Python 3.6+
* You must have an [Azure subscription](https://azure.microsoft.com/free/)

## Setup

1. Install the latest beta version of Azure Purview Sharing that the samples use:

```bash
pip install azure-purview-sharing
```

2. Clone or download this sample repository.
3. Open the sample folder in Visual Studio Code or your IDE of choice.

## Running the samples

1. Open a terminal window and `cd` to the directory that the samples are saved in.
2. Set the environment variables specified in the sample file you wish to run.
3. Follow the usage described in the file, e.g. `python sent_shares_examples.py`

## Next steps

Check out the [API reference documentation](https://aka.ms/azsdk/python/purviewcatalog/ref-docs) to learn more about
what you can do with the Azure Purview Sharing API client library.