Skip to main content

No project description provided

Project description

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")

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyconfluent-0.0.6.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

pyconfluent-0.0.6-py3-none-any.whl (45.2 kB view details)

Uploaded Python 3

File details

Details for the file pyconfluent-0.0.6.tar.gz.

File metadata

  • Download URL: pyconfluent-0.0.6.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for pyconfluent-0.0.6.tar.gz
Algorithm Hash digest
SHA256 dd9ae5de6f7b41f08ba62251cc847f37e85093a3696d66bf52d1728900415b82
MD5 e052f060e97b918840b0e3db2d98275c
BLAKE2b-256 91635ac331bbf314d7fbb344b859d95c68fe79ccec5c326fd850175ad673b591

See more details on using hashes here.

File details

Details for the file pyconfluent-0.0.6-py3-none-any.whl.

File metadata

  • Download URL: pyconfluent-0.0.6-py3-none-any.whl
  • Upload date:
  • Size: 45.2 kB
  • Tags: Python 3
  • Uploaded using 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

File hashes

Hashes for pyconfluent-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 ea405eec99ee122eac22a72d20db1506f1d8f0f871ba771f82cb9ff3cff37c29
MD5 8ecf214b665bd6ca2045e19847185d62
BLAKE2b-256 e62c5ff000f6ebee9a0c4dfd1f71329c7ffa907be211bcf973ddb68a9fa1933b

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page