Skip to main content

produce events to kafka

Project description

KafkaProducerSelf KafkaProducerSelf is a Python library that offers general functions to interact with Kafka producers and publish events using them. Additionally, it includes a health check feature to ensure the connection is live and working properly.

Installation To install KafkaProducerSelf, simply use pip:

Functionality:

The library provides three main functions:

1. health_check Accepts a URL as a parameter. Returns a tuple: True/False: Indicates whether the connection is active or not. String: Success or failure message.

2. connect_to_kafka_producer Accepts a URL as a parameter. Returns a tuple: True/False: Indicates the status of the producer (whether connected or not). Obj/String: The producer object if connected successfully; otherwise, an error message.

3. push_event_to_kafka Accepts eventData, topicName, and producer as parameters. Returns a tuple: True/False: Indicates if the message was successfully published or not. String: Success or failure message.

Note: Make sure you have a running Kafka broker accessible at the specified URL before using this library. For any issues or questions, please refer to the documentation or contact the library maintainers.

Change log

0.0.1 (27/07/2023)

  • First Release

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

kafkaproducerself-0.0.5.tar.gz (2.2 MB view details)

Uploaded Source

File details

Details for the file kafkaproducerself-0.0.5.tar.gz.

File metadata

  • Download URL: kafkaproducerself-0.0.5.tar.gz
  • Upload date:
  • Size: 2.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.6

File hashes

Hashes for kafkaproducerself-0.0.5.tar.gz
Algorithm Hash digest
SHA256 fbccc7a00b664d769475a6e27e275fef9b490bcd7fce5adc2f1e10c778c3dc52
MD5 161e2080aab5e2af96bf9c3bb24184e7
BLAKE2b-256 26d8e8e54dbd5a2118d7d8328f704eaae78abe07e738bd93d60cf7486222a3a3

See more details on using hashes here.

Supported by

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