Kafkapy
A python command line interface for inspection and management of a kafka cluster. kafkapy is a single utility
for all management and inspection actions. I wrote this tool when working with AWS MSK as dealing with many
different utility scripts from confluence was combersome and often required additional pre/post processing of the
data which is not in a suitable format for piping etc, thus kafkapy was born.
kafkapy aims to implement all the actions supported by the confluence utility scripts, but also plans to build in
testability for common tasks, such as calculating the sum of all offset lag across all partitions for a topic etc.
All output from kafkapy to stdout is fully compliant json and suitable for piping to tools etc.
[!CAUTION]
Kafkapyrequires broker versions 0.11.0.0 or greater.
Quick Start
kafkapy is very simple to use, you need two simple things to get started.
# install the python package:
pip install kafkapy
# to get started:
kafkapy --help
[!TIP] Ensure your kafka cluster is up and running.
In order to interact with kafka, you should create a properties.yaml file on disk and provide it's path to
any commands, the properties.yaml file will honour any librdkafka properties. By default kafkapy will
look inside ~/.kafkapy/properties.yaml as a fallback should you not provide the option explicitly via
--properties.
Additionally all commands take an (Optional) --bootstrap-servers (List) option which you can specify the
broker addresses manually, these are also available via librdkafka config via the bootstrap.servers property
so can reside in your properties.yaml file if you so choose.
[!TIP] Ensure your
~/.kafkapy/properties.yamlcontains appropriate properties for auth etc.
View librdkafka properties Here
[!TIP]
kafkapylooks great, but when piping to other tooling colour is automatically excluded for unix compatibility
User Guide
[!TIP] For full examples, visit the user guide at: https://symonk.github.io/kafkapy/
Contributing
If you want to contribute with Kafkapy check out the Contributing Guide to learn how to start.
Metadata
Release files for kafkapy 0.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| kafkapy-0.3.1.tar.gz | 15.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| kafkapy-0.3.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 35.6 kB
Release files / kafkapy-0.3.1.tar.gz
| Download URL | kafkapy-0.3.1.tar.gz |
|---|---|
| Size | 15.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5fc19d2ab2b48c7b944ba41304791ef7aafe49024234a5074376afa881aa2d09
|
|
BLAKE2b-256 checksum How to use checksums |
d6a1bf67408b252b1542d36492dea7c883f284b42687be4e53c62c33e4b58de5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.7.1 CPython/3.12.1 Linux/6.2.0-1018-azure
|
Release files / kafkapy-0.3.1-py3-none-any.whl
| Download URL | kafkapy-0.3.1-py3-none-any.whl |
|---|---|
| Size | 19.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bd13f156bc8c13c79bae6bb099a490f0746f622f24c0a207ca56e853dcef15a7
|
|
BLAKE2b-256 checksum How to use checksums |
381dbe29846c82cb54f4248783991f0140a5877fb420034cd4ccbef37bb54c61
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.7.1 CPython/3.12.1 Linux/6.2.0-1018-azure
|