summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-04-21 11:15:33 +0000
committerCoprDistGit <infra@openeuler.org>2023-04-21 11:15:33 +0000
commit34189ab3974569c8ff5d882edfdfcfb2e049b5f2 (patch)
treeddd9f312102b5ddd2b867a05a39243de38d83203
parent2afe3646c92a885166f84c930e6024559a100e92 (diff)
automatic import of python-azure-eventgridopeneuler20.03
-rw-r--r--.gitignore1
-rw-r--r--python-azure-eventgrid.spec214
-rw-r--r--sources2
3 files changed, 144 insertions, 73 deletions
diff --git a/.gitignore b/.gitignore
index b999a64..a4439a7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
/azure-eventgrid-4.9.1.zip
+/azure-eventgrid-4.10.0.zip
diff --git a/python-azure-eventgrid.spec b/python-azure-eventgrid.spec
index cc3a17d..e8526eb 100644
--- a/python-azure-eventgrid.spec
+++ b/python-azure-eventgrid.spec
@@ -1,22 +1,26 @@
%global _empty_manifest_terminate_build 0
Name: python-azure-eventgrid
-Version: 4.9.1
+Version: 4.10.0
Release: 1
Summary: Microsoft Azure Event Grid Client Library for Python
License: MIT License
URL: https://github.com/Azure/azure-sdk-for-python
-Source0: https://mirrors.nju.edu.cn/pypi/web/packages/5f/24/6b22e91436974f4d420972637e3915724d130f1fe96d33e114152013359b/azure-eventgrid-4.9.1.zip
+Source0: https://mirrors.nju.edu.cn/pypi/web/packages/7d/c1/ab6b641dd8b5617b6425ee43474b1e15a8a9fca8413627202ec7c25097f3/azure-eventgrid-4.10.0.zip
BuildArch: noarch
-Requires: python3-msrest
-Requires: python3-azure-core
%description
# Azure Event Grid client library for Python
Azure Event Grid is a fully-managed intelligent event routing service that allows for uniform event consumption using a publish-subscribe model.
-[Source code][python-eg-src] | [Package (PyPI)][python-eg-pypi] | [API reference documentation][python-eg-ref-docs] | [Product documentation][python-eg-product-docs] | [Samples][python-eg-samples] | [Changelog][python-eg-changelog]
+[Source code][python-eg-src]
+| [Package (PyPI)][python-eg-pypi]
+| [Package (Conda)](https://anaconda.org/microsoft/azure-eventgrid/)
+| [API reference documentation][python-eg-ref-docs]
+| [Product documentation][python-eg-product-docs]
+| [Samples][python-eg-samples]
+| [Changelog][python-eg-changelog]
## _Disclaimer_
@@ -66,24 +70,19 @@ With the `azure-identity` package, you can seamlessly authorize requests in both
For example, you can use `DefaultAzureCredential` to construct a client which will authenticate using Azure Active Directory:
-```Python
+<!-- SNIPPET:sample_authentication.client_auth_with_token_cred -->
+
+```python
from azure.identity import DefaultAzureCredential
from azure.eventgrid import EventGridPublisherClient, EventGridEvent
-event = EventGridEvent(
- data={"team": "azure-sdk"},
- subject="Door1",
- event_type="Azure.Sdk.Demo",
- data_version="2.0"
-)
-
credential = DefaultAzureCredential()
-endpoint = os.environ["EG_TOPIC_HOSTNAME"]
+endpoint = os.environ["EVENTGRID_TOPIC_ENDPOINT"]
client = EventGridPublisherClient(endpoint, credential)
-
-client.send(event)
```
+<!-- END SNIPPET -->
+
#### Looking up the endpoint
You can find the topic endpoint within the Event Grid Topic resource on the Azure portal. This will look like:
`"https://<event-grid-topic-name>.<topic-location>.eventgrid.azure.net/api/events"`
@@ -95,14 +94,22 @@ pass the key as a string into an instance of [AzureKeyCredential][azure-key-cred
> **Note:** The Access Key may be found in the azure portal in the "Access Keys" menu of the Event Grid Topic resource. They may also be obtained via the azure CLI, or the `azure-mgmt-eventgrid` library. A guide for getting access keys can be found [here](https://docs.microsoft.com/azure/event-grid/get-access-keys).
+<!-- SNIPPET:sample_authentication.client_auth_with_key_cred -->
+
```python
-from azure.core.credentials import AzureKeyCredential
+import os
from azure.eventgrid import EventGridPublisherClient
+from azure.core.credentials import AzureKeyCredential
+
+topic_key = os.environ["EVENTGRID_TOPIC_KEY"]
+endpoint = os.environ["EVENTGRID_TOPIC_ENDPOINT"]
-endpoint = "https://<name>.<region>.eventgrid.azure.net/api/events"
-credential = AzureKeyCredential("<access_key>")
-eg_publisher_client = EventGridPublisherClient(endpoint, credential)
+credential = AzureKeyCredential(topic_key)
+client = EventGridPublisherClient(endpoint, credential)
```
+
+<!-- END SNIPPET -->
+
> **Note:** A client may also be authenticated via SAS signature, using the `AzureSasCredential`. A sample demonstrating this, is available [here][python-eg-sample-send-using-sas] ([async_version][python-eg-sample-send-using-sas-async]).
> **Note:** The `generate_sas` method can be used to generate a shared access signature. A sample demonstrating this can be seen [here][python-eg-generate-sas].
@@ -186,7 +193,7 @@ The following sections provide several code snippets covering some of the most c
This example publishes an Event Grid event.
-```Python
+```python
import os
from azure.core.credentials import AzureKeyCredential
from azure.eventgrid import EventGridPublisherClient, EventGridEvent
@@ -211,7 +218,7 @@ client.send(event)
This example publishes a Cloud event.
-```Python
+```python
import os
from azure.core.credentials import AzureKeyCredential
from azure.core.messaging import CloudEvent
@@ -238,7 +245,7 @@ It is possible to send events as a batch when sending multiple events to a topic
**WARNING:** When sending a list of multiple events at one time, iterating over and sending each event will not result in optimal performance. For best performance, it is highly recommended to send a list of events.
-```Python
+```python
import os
from azure.core.credentials import AzureKeyCredential
from azure.core.messaging import CloudEvent
@@ -272,7 +279,7 @@ A dict representation of respective serialized models can also be used to publis
Use a dict-like representation to send to a topic with custom schema as shown below.
-```Python
+```python
import os
import uuid
import datetime as dt
@@ -302,7 +309,7 @@ client.send(event)
This example consumes a message received from storage queue and deserializes it to a CloudEvent object.
-```Python
+```python
from azure.core.messaging import CloudEvent
from azure.storage.queue import QueueServiceClient, BinaryBase64DecodePolicy
import os
@@ -326,7 +333,7 @@ with QueueServiceClient.from_connection_string(connection_str) as qsc:
This example consumes a payload message received from ServiceBus and deserializes it to an EventGridEvent object.
-```Python
+```python
from azure.eventgrid import EventGridEvent
from azure.servicebus import ServiceBusClient
import os
@@ -507,6 +514,21 @@ This project has adopted the [Microsoft Open Source Code of Conduct][code_of_con
# Release History
+## 4.10.0 (2023-04-11)
+
+### Features Added
+
+- Added new enum values to `SystemEventNames` related to Azure Communication Services, DataBox and ApiManagementGateway APIs.
+
+### Bugs Fixed
+
+- `SystemEventNames` enums for APIManagement were incorrectly capitalized, changed `Api` to `API`.
+
+### Other Changes
+
+- Removed `msrest` dependency and `six` dependency
+- Added `isodate` dependency
+
## 4.9.1 (2022-11-08)
- This version and all future versions will require Python 3.7+.
@@ -739,7 +761,13 @@ BuildRequires: python3-pip
Azure Event Grid is a fully-managed intelligent event routing service that allows for uniform event consumption using a publish-subscribe model.
-[Source code][python-eg-src] | [Package (PyPI)][python-eg-pypi] | [API reference documentation][python-eg-ref-docs] | [Product documentation][python-eg-product-docs] | [Samples][python-eg-samples] | [Changelog][python-eg-changelog]
+[Source code][python-eg-src]
+| [Package (PyPI)][python-eg-pypi]
+| [Package (Conda)](https://anaconda.org/microsoft/azure-eventgrid/)
+| [API reference documentation][python-eg-ref-docs]
+| [Product documentation][python-eg-product-docs]
+| [Samples][python-eg-samples]
+| [Changelog][python-eg-changelog]
## _Disclaimer_
@@ -789,24 +817,19 @@ With the `azure-identity` package, you can seamlessly authorize requests in both
For example, you can use `DefaultAzureCredential` to construct a client which will authenticate using Azure Active Directory:
-```Python
+<!-- SNIPPET:sample_authentication.client_auth_with_token_cred -->
+
+```python
from azure.identity import DefaultAzureCredential
from azure.eventgrid import EventGridPublisherClient, EventGridEvent
-event = EventGridEvent(
- data={"team": "azure-sdk"},
- subject="Door1",
- event_type="Azure.Sdk.Demo",
- data_version="2.0"
-)
-
credential = DefaultAzureCredential()
-endpoint = os.environ["EG_TOPIC_HOSTNAME"]
+endpoint = os.environ["EVENTGRID_TOPIC_ENDPOINT"]
client = EventGridPublisherClient(endpoint, credential)
-
-client.send(event)
```
+<!-- END SNIPPET -->
+
#### Looking up the endpoint
You can find the topic endpoint within the Event Grid Topic resource on the Azure portal. This will look like:
`"https://<event-grid-topic-name>.<topic-location>.eventgrid.azure.net/api/events"`
@@ -818,14 +841,22 @@ pass the key as a string into an instance of [AzureKeyCredential][azure-key-cred
> **Note:** The Access Key may be found in the azure portal in the "Access Keys" menu of the Event Grid Topic resource. They may also be obtained via the azure CLI, or the `azure-mgmt-eventgrid` library. A guide for getting access keys can be found [here](https://docs.microsoft.com/azure/event-grid/get-access-keys).
+<!-- SNIPPET:sample_authentication.client_auth_with_key_cred -->
+
```python
-from azure.core.credentials import AzureKeyCredential
+import os
from azure.eventgrid import EventGridPublisherClient
+from azure.core.credentials import AzureKeyCredential
+
+topic_key = os.environ["EVENTGRID_TOPIC_KEY"]
+endpoint = os.environ["EVENTGRID_TOPIC_ENDPOINT"]
-endpoint = "https://<name>.<region>.eventgrid.azure.net/api/events"
-credential = AzureKeyCredential("<access_key>")
-eg_publisher_client = EventGridPublisherClient(endpoint, credential)
+credential = AzureKeyCredential(topic_key)
+client = EventGridPublisherClient(endpoint, credential)
```
+
+<!-- END SNIPPET -->
+
> **Note:** A client may also be authenticated via SAS signature, using the `AzureSasCredential`. A sample demonstrating this, is available [here][python-eg-sample-send-using-sas] ([async_version][python-eg-sample-send-using-sas-async]).
> **Note:** The `generate_sas` method can be used to generate a shared access signature. A sample demonstrating this can be seen [here][python-eg-generate-sas].
@@ -909,7 +940,7 @@ The following sections provide several code snippets covering some of the most c
This example publishes an Event Grid event.
-```Python
+```python
import os
from azure.core.credentials import AzureKeyCredential
from azure.eventgrid import EventGridPublisherClient, EventGridEvent
@@ -934,7 +965,7 @@ client.send(event)
This example publishes a Cloud event.
-```Python
+```python
import os
from azure.core.credentials import AzureKeyCredential
from azure.core.messaging import CloudEvent
@@ -961,7 +992,7 @@ It is possible to send events as a batch when sending multiple events to a topic
**WARNING:** When sending a list of multiple events at one time, iterating over and sending each event will not result in optimal performance. For best performance, it is highly recommended to send a list of events.
-```Python
+```python
import os
from azure.core.credentials import AzureKeyCredential
from azure.core.messaging import CloudEvent
@@ -995,7 +1026,7 @@ A dict representation of respective serialized models can also be used to publis
Use a dict-like representation to send to a topic with custom schema as shown below.
-```Python
+```python
import os
import uuid
import datetime as dt
@@ -1025,7 +1056,7 @@ client.send(event)
This example consumes a message received from storage queue and deserializes it to a CloudEvent object.
-```Python
+```python
from azure.core.messaging import CloudEvent
from azure.storage.queue import QueueServiceClient, BinaryBase64DecodePolicy
import os
@@ -1049,7 +1080,7 @@ with QueueServiceClient.from_connection_string(connection_str) as qsc:
This example consumes a payload message received from ServiceBus and deserializes it to an EventGridEvent object.
-```Python
+```python
from azure.eventgrid import EventGridEvent
from azure.servicebus import ServiceBusClient
import os
@@ -1230,6 +1261,21 @@ This project has adopted the [Microsoft Open Source Code of Conduct][code_of_con
# Release History
+## 4.10.0 (2023-04-11)
+
+### Features Added
+
+- Added new enum values to `SystemEventNames` related to Azure Communication Services, DataBox and ApiManagementGateway APIs.
+
+### Bugs Fixed
+
+- `SystemEventNames` enums for APIManagement were incorrectly capitalized, changed `Api` to `API`.
+
+### Other Changes
+
+- Removed `msrest` dependency and `six` dependency
+- Added `isodate` dependency
+
## 4.9.1 (2022-11-08)
- This version and all future versions will require Python 3.7+.
@@ -1459,7 +1505,13 @@ Provides: python3-azure-eventgrid-doc
Azure Event Grid is a fully-managed intelligent event routing service that allows for uniform event consumption using a publish-subscribe model.
-[Source code][python-eg-src] | [Package (PyPI)][python-eg-pypi] | [API reference documentation][python-eg-ref-docs] | [Product documentation][python-eg-product-docs] | [Samples][python-eg-samples] | [Changelog][python-eg-changelog]
+[Source code][python-eg-src]
+| [Package (PyPI)][python-eg-pypi]
+| [Package (Conda)](https://anaconda.org/microsoft/azure-eventgrid/)
+| [API reference documentation][python-eg-ref-docs]
+| [Product documentation][python-eg-product-docs]
+| [Samples][python-eg-samples]
+| [Changelog][python-eg-changelog]
## _Disclaimer_
@@ -1509,24 +1561,19 @@ With the `azure-identity` package, you can seamlessly authorize requests in both
For example, you can use `DefaultAzureCredential` to construct a client which will authenticate using Azure Active Directory:
-```Python
+<!-- SNIPPET:sample_authentication.client_auth_with_token_cred -->
+
+```python
from azure.identity import DefaultAzureCredential
from azure.eventgrid import EventGridPublisherClient, EventGridEvent
-event = EventGridEvent(
- data={"team": "azure-sdk"},
- subject="Door1",
- event_type="Azure.Sdk.Demo",
- data_version="2.0"
-)
-
credential = DefaultAzureCredential()
-endpoint = os.environ["EG_TOPIC_HOSTNAME"]
+endpoint = os.environ["EVENTGRID_TOPIC_ENDPOINT"]
client = EventGridPublisherClient(endpoint, credential)
-
-client.send(event)
```
+<!-- END SNIPPET -->
+
#### Looking up the endpoint
You can find the topic endpoint within the Event Grid Topic resource on the Azure portal. This will look like:
`"https://<event-grid-topic-name>.<topic-location>.eventgrid.azure.net/api/events"`
@@ -1538,14 +1585,22 @@ pass the key as a string into an instance of [AzureKeyCredential][azure-key-cred
> **Note:** The Access Key may be found in the azure portal in the "Access Keys" menu of the Event Grid Topic resource. They may also be obtained via the azure CLI, or the `azure-mgmt-eventgrid` library. A guide for getting access keys can be found [here](https://docs.microsoft.com/azure/event-grid/get-access-keys).
+<!-- SNIPPET:sample_authentication.client_auth_with_key_cred -->
+
```python
-from azure.core.credentials import AzureKeyCredential
+import os
from azure.eventgrid import EventGridPublisherClient
+from azure.core.credentials import AzureKeyCredential
+
+topic_key = os.environ["EVENTGRID_TOPIC_KEY"]
+endpoint = os.environ["EVENTGRID_TOPIC_ENDPOINT"]
-endpoint = "https://<name>.<region>.eventgrid.azure.net/api/events"
-credential = AzureKeyCredential("<access_key>")
-eg_publisher_client = EventGridPublisherClient(endpoint, credential)
+credential = AzureKeyCredential(topic_key)
+client = EventGridPublisherClient(endpoint, credential)
```
+
+<!-- END SNIPPET -->
+
> **Note:** A client may also be authenticated via SAS signature, using the `AzureSasCredential`. A sample demonstrating this, is available [here][python-eg-sample-send-using-sas] ([async_version][python-eg-sample-send-using-sas-async]).
> **Note:** The `generate_sas` method can be used to generate a shared access signature. A sample demonstrating this can be seen [here][python-eg-generate-sas].
@@ -1629,7 +1684,7 @@ The following sections provide several code snippets covering some of the most c
This example publishes an Event Grid event.
-```Python
+```python
import os
from azure.core.credentials import AzureKeyCredential
from azure.eventgrid import EventGridPublisherClient, EventGridEvent
@@ -1654,7 +1709,7 @@ client.send(event)
This example publishes a Cloud event.
-```Python
+```python
import os
from azure.core.credentials import AzureKeyCredential
from azure.core.messaging import CloudEvent
@@ -1681,7 +1736,7 @@ It is possible to send events as a batch when sending multiple events to a topic
**WARNING:** When sending a list of multiple events at one time, iterating over and sending each event will not result in optimal performance. For best performance, it is highly recommended to send a list of events.
-```Python
+```python
import os
from azure.core.credentials import AzureKeyCredential
from azure.core.messaging import CloudEvent
@@ -1715,7 +1770,7 @@ A dict representation of respective serialized models can also be used to publis
Use a dict-like representation to send to a topic with custom schema as shown below.
-```Python
+```python
import os
import uuid
import datetime as dt
@@ -1745,7 +1800,7 @@ client.send(event)
This example consumes a message received from storage queue and deserializes it to a CloudEvent object.
-```Python
+```python
from azure.core.messaging import CloudEvent
from azure.storage.queue import QueueServiceClient, BinaryBase64DecodePolicy
import os
@@ -1769,7 +1824,7 @@ with QueueServiceClient.from_connection_string(connection_str) as qsc:
This example consumes a payload message received from ServiceBus and deserializes it to an EventGridEvent object.
-```Python
+```python
from azure.eventgrid import EventGridEvent
from azure.servicebus import ServiceBusClient
import os
@@ -1950,6 +2005,21 @@ This project has adopted the [Microsoft Open Source Code of Conduct][code_of_con
# Release History
+## 4.10.0 (2023-04-11)
+
+### Features Added
+
+- Added new enum values to `SystemEventNames` related to Azure Communication Services, DataBox and ApiManagementGateway APIs.
+
+### Bugs Fixed
+
+- `SystemEventNames` enums for APIManagement were incorrectly capitalized, changed `Api` to `API`.
+
+### Other Changes
+
+- Removed `msrest` dependency and `six` dependency
+- Added `isodate` dependency
+
## 4.9.1 (2022-11-08)
- This version and all future versions will require Python 3.7+.
@@ -2172,7 +2242,7 @@ introduce breaking changes.
%prep
-%autosetup -n azure-eventgrid-4.9.1
+%autosetup -n azure-eventgrid-4.10.0
%build
%py3_build
@@ -2212,5 +2282,5 @@ mv %{buildroot}/doclist.lst .
%{_docdir}/*
%changelog
-* Mon Apr 10 2023 Python_Bot <Python_Bot@openeuler.org> - 4.9.1-1
+* Fri Apr 21 2023 Python_Bot <Python_Bot@openeuler.org> - 4.10.0-1
- Package Spec generated
diff --git a/sources b/sources
index 8a95455..bf6e831 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-3b81e4ea8ae755671767548f6e060e93 azure-eventgrid-4.9.1.zip
+ef454c814593902dfafa406a8b6a978d azure-eventgrid-4.10.0.zip