Skip to content

Commit e8bdc65

Browse files
committed
Rename asyncio.py example to avoid circular import (confluentinc#945)
1 parent c5ab945 commit e8bdc65

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

examples/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
The scripts in this directory provide code examples using Confluent's Python client:
22

33
* [adminapi.py](adminapi.py): collection of Kafka Admin API operations
4+
* [asyncio_example.py](asyncio_example.py): AsyncIO webserver with Kafka producer
45
* [avro-cli.py](avro-cli.py): produces Avro messages with Confluent Schema Registry and then reads them back again
56
* [consumer.py](consumer.py): reads messages from a Kafka topic
67
* [producer.py](producer.py): reads lines from stdin and sends them to Kafka

examples/asyncio.py renamed to examples/asyncio_example.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#!/usr/bin/env python
2+
13
# flake8: noqa
24
# Copyright 2019 Confluent Inc.
35
#
@@ -13,13 +15,15 @@
1315
# See the License for the specific language governing permissions and
1416
# limitations under the License.
1517

18+
1619
# Companion code to the blog post "Integrating Kafka With Python
1720
# Asyncio Web Applications"
1821
# https://www.confluent.io/blog/kafka-python-asyncio-integration/
19-
22+
#
2023
# Example Siege [https://github.com/JoeDog/siege] test:
2124
# $ siege -c 400 -r 200 'http://localhost:8000/items1 POST {"name":"testuser"}'
2225

26+
2327
import asyncio
2428
import confluent_kafka
2529
from confluent_kafka import KafkaException

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy