Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[EventGrid] README.md updates #13517

Merged
merged 1 commit into from
Sep 4, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 16 additions & 15 deletions sdk/eventgrid/azure-eventgrid/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Azure EventGrid client library for Python
# 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.

Expand All @@ -8,20 +8,20 @@ Azure Event Grid is a fully-managed intelligent event routing service that allow

### Prerequisites
* Python 2.7, or 3.5 or later is required to use this package.
* You must have an [Azure subscription][azure_subscription] and an EventGrid Topic resource to use this package.
* You must have an [Azure subscription][azure_subscription] and an Event Grid Topic resource to use this package.

### Install the package
Install the Azure EventGrid client library for Python with [pip][pip]:
Install the Azure Event Grid client library for Python with [pip][pip]:

```bash
pip install azure-eventgrid
```

#### Create an EventGrid Topic
#### Create an Event Grid Topic
You can create the resource using [Azure Portal][azure_portal_create_EG_resource]

### Authenticate the client
In order to interact with the Eventgrid service, you will need to create an instance of a client.
In order to interact with the Event Grid service, you will need to create an instance of a client.
A **topic_hostname** and **credential** are necessary to instantiate the client object.

#### Looking up the endpoint
Expand All @@ -43,7 +43,7 @@ eg_publisher_client = EventGridPublisherClient(topic_hostname, credential)

## Key concepts

Information about the key concepts on EventGrid, see [Concepts in Azure Event Grid][publisher-service-doc]
Information about the key concepts on Event Grid, see [Concepts in Azure Event Grid][publisher-service-doc]

### EventGridPublisherClient
`EventGridPublisherClient` provides operations to send event data to topic hostname specified during client initialization.
Expand All @@ -54,16 +54,16 @@ Either a list or a single instance of CloudEvent/EventGridEvent/CustomEvent can

## Examples

The following sections provide several code snippets covering some of the most common EventGrid tasks, including:
The following sections provide several code snippets covering some of the most common Event Grid tasks, including:

* [Send an EventGrid Event](#send-an-eventgrid-event)
* [Send an Event Grid Event](#send-an-eventgrid-event)
* [Send a Cloud Event](#send-a-cloud-event)
* [Consume an eventgrid Event](#consume-an-eventgrid-event)
* [Consume a cloud Event](#consume-a-cloud-event)

### Send an EventGrid Event
### Send an Event Grid Event

This example publishes an EventGrid event.
This example publishes an Event Grid event.

```Python
import os
Expand Down Expand Up @@ -110,7 +110,7 @@ client = EventGridPublisherClient(topic_hostname, credential)
client.send(event)
```

### Consume an EventGrid Event
### Consume an Event Grid Event

This example demonstrates consuming and deserializing an eventgrid event.

Expand Down Expand Up @@ -173,7 +173,7 @@ time_string = deserialized_event["time"]
- Enable `azure.eventgrid` logger to collect traces from the library.

### General
Eventgrid client library will raise exceptions defined in [Azure Core][azure_core_exceptions].
Event Grid client library will raise exceptions defined in [Azure Core][azure_core_exceptions].

### Logging
This library uses the standard
Expand All @@ -189,11 +189,11 @@ describes available configurations for retries, logging, transport protocols, an

## Next steps

The following section provides several code snippets illustrating common patterns used in the EventGrid Python API.
The following section provides several code snippets illustrating common patterns used in the Event Grid Python API.

### More sample code

These code samples show common champion scenario operations with the Azure Eventgrid client library.
These code samples show common champion scenario operations with the Azure Event Grid client library.

* Publish Custom Events to a topic: [cs1_publish_custom_events_to_a_topic.py][python-eg-sample-customevent]
* Publish Custom events to a domain topic: [cs2_publish_custom_events_to_a_domain_topic.py][python-eg-sample-customevent-to-domain]
Expand All @@ -206,7 +206,7 @@ More samples can be found [here][python-eg-samples].

### Additional documentation

For more extensive documentation on Azure EventGrid, see the [Eventgrid documentation][python-eg-product-docs] on docs.microsoft.com.
For more extensive documentation on Azure Event Grid, see the [Event Grid documentation][python-eg-product-docs] on docs.microsoft.com.

## Contributing
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 [cla.microsoft.com][cla].
Expand All @@ -229,6 +229,7 @@ This project has adopted the [Microsoft Open Source Code of Conduct][code_of_con
[azure_core_exceptions]: https://aka.ms/azsdk/python/core/docs#module-azure.core.exceptions
[python_logging]: https://docs.python.org/3/library/logging.html
[azure_core_ref_docs]: https://aka.ms/azsdk/python/core/docs
[azure_subscription]: https://azure.microsoft.com/free/

[python-eg-sample-customevent]: https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/eventgrid/azure-eventgrid/samples/champion_scenarios/cs1_publish_custom_events_to_a_topic.py
[python-eg-sample-customevent-to-domain]: https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/eventgrid/azure-eventgrid/samples/champion_scenarios/cs2_publish_custom_events_to_a_domain_topic.py
Expand Down