-
Notifications
You must be signed in to change notification settings - Fork 919
Closed
Labels
docsRequesting a documentation changeRequesting a documentation changeenhancementRequesting a feature changeRequesting a feature change
Description
Description
The examples in the README does not correspond to the API documentation.
For example in the README it says:
from confluent_kafka import Consumer, KafkaError
c = Consumer({'bootstrap.servers': 'mybroker', 'group.id': 'mygroup',
'default.topic.config': {'auto.offset.reset': 'smallest'}})
However in the API docs the constructor looks like this:
Consumer(**kwargs)
This was rather confusing when starting out. Moreover my IDE considered the form in the README to be invalid (it did not match the signature).
The examples also look like what I would expect.
Thus I suggest to change the README to Consumer(**{...})
.
Edit: The same is also true for the constructors of Producer
and the Avro constructors as well
How to reproduce
N/A
Checklist
Please provide the following information:
- confluent-kafka-python and librdkafka version (
confluent_kafka.version()
andconfluent_kafka.libversion()
): N/A - Apache Kafka broker version: N/A
- Client configuration: N/A
- Operating system: N/A
- Provide client logs (with
'debug': '..'
as necessary): N/A - Provide broker log excerpts: N/A
- Critical issue
Metadata
Metadata
Assignees
Labels
docsRequesting a documentation changeRequesting a documentation changeenhancementRequesting a feature changeRequesting a feature change