Skip to main content

Kafka library for producing and consuming

Project description

This library makes working with kafka in python easy. It simplifies the producing of records. The producer class persists fields so that the fields of a record can be retrieved in various places from within your code base.

The library that expands on the work of Confluent's kafka-python library to make an intuitive producer that simplifies coding. This producer acts as a Super Class that you can inherit all of your specific producers in your code. The implementation takes five lines of code

  • Set the KAFKA_REGISTRY_LISTENER and KAFKA_BROKER_LISTENER (2 lines of code)
  • from kp_fraydit.producers.producer import Producer
  • prod = Producer('my-topic')
  • prod.addValueArgs(myField1='test')

That is all that is needed to produce a record.

It utilizes Confluent's amazing Exact-Once Semantics(EOS) architecture. That assurance takes time, however. To speed up the library, all producer instances pool their records and then the records are parallel processed. This enhances the speed of the library while maintaining the EOS assurance. The sacrifice of this pooling loses the guarantee of order preservation. The library allows for individual producer instances to maintain a separate pool that ensures order.

The producer handles JSON and Avro schema automatically. Nested schema (Avro only) is handled. That means you can have records within records and the producer class knows how to handle that.

You can discover what fields are available, which fields are required, optional fields, specify optional fields that you want to include on each write, all from within the attributes of the producer.

https://fraydit.com

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

kp_fraydit-0.1.1.tar.gz (8.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kp_fraydit-0.1.1-py3-none-any.whl (9.0 kB view details)

Uploaded Python 3

File details

Details for the file kp_fraydit-0.1.1.tar.gz.

File metadata

  • Download URL: kp_fraydit-0.1.1.tar.gz
  • Upload date:
  • Size: 8.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.8.10

File hashes

Hashes for kp_fraydit-0.1.1.tar.gz
Algorithm Hash digest
SHA256 c4ca0cb6d51a6f325e03853614db116dc1c23551e2b2ec48979d38a3d02390cf
MD5 93e8ca3ecb014fc7ca54b0eb738f3c3a
BLAKE2b-256 5d63f2d4365fd56a3a66a37dbdca9bc70732cb47242d49433d55616f0ac3c2fb

See more details on using hashes here.

File details

Details for the file kp_fraydit-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: kp_fraydit-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 9.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.8.10

File hashes

Hashes for kp_fraydit-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e084ec0892a1d517edb3f9ef2674aca1e6e0b7a475f6546d69974e4b74260c47
MD5 126efdc1fecb62751c74c2f20a92d8fd
BLAKE2b-256 828ff4e4d2ec788219f27170db2066c8ca470daa0c4f69ff3477ed64184e0b37

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