Skip to main content

Python adapter for Kafka

Project description

python-test-bed-adapter

This is the test-bed adapter for Python: it allows you to easily connect Python services to the Apache Kafka test-bed via Python.

The implementation is a wrapper around Pykafka and avro-python3 offering support for:

  • AVRO schema's and messages: both key's and values should have a schema as explained here.
  • Kafka consumer and producer for the test-bed topics.
  • Management
    • Heartbeat (topic: connect-status-heartbeat), so you know which clients are online. Each time the test-bed-adapter is executed, it starts a heartbeat process to notify the its activity to other clients.
    • Configuration (topic: connect-status-configuration), so you can see which topics clients consume and produce.

Installation

You need to install Python 3+.

To run the examples you will need to install the dependencies specified on the filerequirements.txt For that, run pip3 install -r requirements.txt from the project folder.

Examples and usage

  • url_producer: creates a message with 4 URLs to RSS feeds on the topic ('system_rss_urls')
  • rss_producer: listens to url messages ('system_rss_urls') and produces RSS messages ('system_rss_urls')
  • rss_consumer: listens to RSS messages ('system_rss_urls') and prints them to console.

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

osint-python-test-bed-adapter-1.0.3.tar.gz (12.7 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file osint-python-test-bed-adapter-1.0.3.tar.gz.

File metadata

File hashes

Hashes for osint-python-test-bed-adapter-1.0.3.tar.gz
Algorithm Hash digest
SHA256 d832b7f58730a5bdfa9ea378742a43af25ab52a9e71ce9dc9c640c2b20df5612
MD5 7ee83b78d982c00ff8db64a827793550
BLAKE2b-256 f5dfa9994551ff765b5b6d2fe9c99f823c0a84d5ab402e4892b6bef0db0285e3

See more details on using hashes here.

File details

Details for the file osint_python_test_bed_adapter-1.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for osint_python_test_bed_adapter-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 c32a44b7ecb87d8680ade6b8043f3567a3816221b79a39d486bf11ed6a882872
MD5 4fed91507226272f3a60a4f0f80eb95b
BLAKE2b-256 855a48bcf171adc6d3cac40b285b04995edf3c83f2672ff3e6357647600ab1e6

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