pyconfluent
pyconfluent brings most Confluent Kafka functionality to Python by providing wrappers for the KSQL and Schema Registry REST APIs, and an in-depth Pythonic interpretation of the Kafka Streams Java package inspired by Robinhood's faust and Winton's winton-kafka-streams.
Installation
This package was written for Python 3.6 and was not tested on other versions.
pip3 install pyconfluent
Usage
pyconfluent requires the Confluent Platform and all its underlying services to be running. When creating class instances, make sure to pass in the list of brokers running or leave it empty to connect to localhost.
KSQL
import KSQL
k = KSQL() # enter your boostrap_server here if not 'localhost', no port
# create streams from existing topics
sales_stream = k.ksql("CREATE STREAM sales (company VARCHAR, product BIGINT, quantity BIGINT)"
"WITH (KAFKA_TOPIC='sales', VALUE_FORMAT='JSON';")
reviews_stream = k.ksql("CREATE STREAM reviews (company VARCHAR, product BIGINT, review VARCHAR)"
"WITH (KAFKA_TOPIC='sales', VALUE_FORMAT='JSON';")
# stream to stream join, WITHIN clause required
# creates and populates new kafka topic
enriched_stream = k.ksql("CREATE STREAM enriched AS SELECT"
"sales.company, sales.product, sales.quantity"
"FROM sales LEFT JOIN reviews WITH 1 HOURS"
"ON sales.company = reviews.company")
Release files for pyconfluent 0.0.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pyconfluent-0.0.6.tar.gz | 3.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pyconfluent-0.0.6-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 48.7 kB
Release files / pyconfluent-0.0.6.tar.gz
| Download URL | pyconfluent-0.0.6.tar.gz |
|---|---|
| Size | 3.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
dd9ae5de6f7b41f08ba62251cc847f37e85093a3696d66bf52d1728900415b82
|
|
BLAKE2b-256 checksum How to use checksums |
91635ac331bbf314d7fbb344b859d95c68fe79ccec5c326fd850175ad673b591
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.8
|
Release files / pyconfluent-0.0.6-py3-none-any.whl
| Download URL | pyconfluent-0.0.6-py3-none-any.whl |
|---|---|
| Size | 45.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ea405eec99ee122eac22a72d20db1506f1d8f0f871ba771f82cb9ff3cff37c29
|
|
BLAKE2b-256 checksum How to use checksums |
e62c5ff000f6ebee9a0c4dfd1f71329c7ffa907be211bcf973ddb68a9fa1933b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.8
|