class KafkaContainer(image: str = 'confluentinc/cp-kafka:7.6.0', port: int = 9093, **kwargs)

Kafka container.

Example

>>> from testcontainers.kafka import KafkaContainer

>>> with KafkaContainer() as kafka:
...    connection = kafka.get_bootstrap_server()
class RedpandaContainer(image: str = 'docker.redpanda.com/redpandadata/redpanda:v23.1.13', **kwargs)

Redpanda container.

Example

>>> from testcontainers.kafka import RedpandaContainer

>>> with RedpandaContainer() as redpanda:
...    connection = redpanda.get_bootstrap_server()