pytest-kafka-broker 0.2.0__py3-none-any.whl → 0.3.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -12,6 +12,7 @@ import pytest_asyncio
12
12
  from astropy.config import get_cache_dir_path # type: ignore[import-untyped]
13
13
  from astropy.utils.data import get_readable_fileobj # type: ignore[import-untyped]
14
14
  from confluent_kafka import Consumer, Producer
15
+ from confluent_kafka.admin import AdminClient
15
16
  from confluent_kafka.aio import AIOConsumer, AIOProducer
16
17
  from rich.status import Status
17
18
 
@@ -87,6 +88,9 @@ class KafkaBrokerContext:
87
88
  def config(self, config: dict | None = None) -> dict:
88
89
  return {**(config or {}), "bootstrap.servers": self.bootstrap_server}
89
90
 
91
+ def admin(self, config: dict | None = None) -> AdminClient:
92
+ return AdminClient(self.config(config))
93
+
90
94
  def producer(self, config: dict | None = None) -> Producer:
91
95
  return Producer(self.config(config))
92
96
 
@@ -100,6 +104,7 @@ class KafkaBrokerContext:
100
104
  return AIOConsumer(self.config(config))
101
105
 
102
106
  config.__doc__ = _doc.format("Get the configuration for a Kafka client.")
107
+ admin.__doc__ = _doc.format("Create a Kafka admin client connected to the cluster.")
103
108
  producer.__doc__ = _doc.format("Create a Kafka producer connected to the cluster.")
104
109
  consumer.__doc__ = _doc.format("Create a Kafka consumer connected to the cluster.")
105
110
  aio_producer.__doc__ = _doc.format(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pytest-kafka-broker
3
- Version: 0.2.0
3
+ Version: 0.3.0
4
4
  Summary: Pytest plugin to run a single-broker Kafka cluster
5
5
  Author-email: Leo Singer <leo.singer@ligo.org>
6
6
  License-Expression: Apache-2.0
@@ -0,0 +1,7 @@
1
+ pytest_kafka_broker/__init__.py,sha256=3mODu1laOwp9moAXLnrMPZo6Zb7CWe-L7g7pVUVvQPU,6396
2
+ pytest_kafka_broker/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
+ pytest_kafka_broker-0.3.0.dist-info/METADATA,sha256=KI9mVBcRN688rjCpdLfNx99-LhOpq4pj_D4u7WTlwYI,683
4
+ pytest_kafka_broker-0.3.0.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
5
+ pytest_kafka_broker-0.3.0.dist-info/entry_points.txt,sha256=mjFsRbu6FOiZkUOlSaXpo4QdLHwniNB-p_NEIgRbDnw,46
6
+ pytest_kafka_broker-0.3.0.dist-info/top_level.txt,sha256=nTrYx9xVeK5hsqbhBRL2bgBV_ea-J66_f4Dk8eD-Ci0,20
7
+ pytest_kafka_broker-0.3.0.dist-info/RECORD,,
@@ -1,7 +0,0 @@
1
- pytest_kafka_broker/__init__.py,sha256=H31mMYb-7j90GOaoaOmh12Fj50i7SRTEhX7l8MC6vbM,6148
2
- pytest_kafka_broker/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
- pytest_kafka_broker-0.2.0.dist-info/METADATA,sha256=XLPnJeSqqZXMYSuY5GPYZBFsSheAaVmfA1BXSYfZgtw,683
4
- pytest_kafka_broker-0.2.0.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
5
- pytest_kafka_broker-0.2.0.dist-info/entry_points.txt,sha256=mjFsRbu6FOiZkUOlSaXpo4QdLHwniNB-p_NEIgRbDnw,46
6
- pytest_kafka_broker-0.2.0.dist-info/top_level.txt,sha256=nTrYx9xVeK5hsqbhBRL2bgBV_ea-J66_f4Dk8eD-Ci0,20
7
- pytest_kafka_broker-0.2.0.dist-info/RECORD,,