Skip to main content

Superclient Python

A Python library for automatically optimizing Kafka producer configurations based on topic-specific recommendations.

Overview

Superstream Clients works as a Python import hook that intercepts Kafka producer creation and applies optimized configurations without requiring any code changes in your application. It dynamically retrieves optimization recommendations from Superstream and applies them based on impact analysis.

Supported Libraries

  • kafka-python
  • aiokafka
  • confluent-kafka
  • Faust
  • FastAPI event publishers
  • Celery Kafka backends
  • Any custom wrapper around these Kafka clients

Features

  • Zero-code integration: No code changes required in your application
  • Dynamic configuration: Applies optimized settings based on topic-specific recommendations
  • Intelligent optimization: Identifies the most impactful topics to optimize
  • Graceful fallback: Falls back to default settings if optimization fails

Installation

pip install superstream-clients && python -m superclient install_pth

That's it! Superclient will now automatically load and optimize all Kafka producers in your Python environment.

Usage

After installation, superclient works automatically. Just use your Kafka clients as usual.

Docker Integration

When using Superstream Clients with containerized applications, include the package in your Dockerfile:

FROM python:3.8-slim

# Install superclient
RUN pip install superstream-clients
RUN python -m superclient install_pth

# Your application code
COPY . /app
WORKDIR /app

# Run your application
CMD ["python", "your_app.py"]

Required Environment Variables

  • SUPERSTREAM_TOPICS_LIST: Comma-separated list of topics your application produces to

Optional Environment Variables

  • SUPERSTREAM_LATENCY_SENSITIVE: Set to "true" to prevent any modification to linger.ms values
  • SUPERSTREAM_DISABLED: Set to "true" to disable optimization
  • SUPERSTREAM_DEBUG: Set to "true" to enable debug logs

Example:

export SUPERSTREAM_TOPICS_LIST=orders,payments,user-events
export SUPERSTREAM_LATENCY_SENSITIVE=true

Prerequisites

  • Python 3.8 or higher
  • Kafka cluster that is connected to the Superstream's console
  • Read and write permissions to the superstream.* topics

License

Apache License 2.0

Release files for superstream-clients-beta 1.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for superstream-clients-beta 1.0.3
File Size Uploaded
superstream_clients_beta-1.0.3.tar.gz 31.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for superstream-clients-beta 1.0.3
File Interpreter ABI Platform
superstream_clients_beta-1.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 66.9 kB

Release files / superstream_clients_beta-1.0.3.tar.gz

Download URL superstream_clients_beta-1.0.3.tar.gz
Size 31.2 kB
Tags Source
SHA-256 checksum
How to use checksums
abf84cac04778905c3363d461e742dcfdc88f6a276553b106e573d0602f48d30
BLAKE2b-256 checksum
How to use checksums
34b749e86297261ff79d7b51f4d147010aec53e12fe2a865c89e95a1687a69da
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.14

Release files / superstream_clients_beta-1.0.3-py3-none-any.whl

Download URL superstream_clients_beta-1.0.3-py3-none-any.whl
Size 35.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
207d1a6a9b336034c8a2e2885ee7a29c30b8e72823201fefc7db57fdc9c28f4d
BLAKE2b-256 checksum
How to use checksums
e0e6cc44bed3d3d08c10c495ee248daf404b51208944600d794f2664877bbee7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.14

Release history Release notifications | RSS feed

This release

1.0.3 This release

2 release files

1.0.2

2 release files

1.0.1

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page