Python data types for the Apache Kafka® Protocol.
Project description
kio
Python data types for the Apache Kafka® Protocol.
Checkout the complete documentation →
Features
- Exposes immutable dataclass entities for all protocol messages, generated from the same source as used internally in Apache Kafka®.
- Message classes are simple light-weight data containers that do not inherit anything or expose any methods other than a regular dataclass. Encoding and decoding is enabled by making all the necessary details about Kafka encoding introspectable.
- Widely compatible encoding and decoding of messages through the
IO[bytes]
interface. - Test suite with focus on roundtrip property tests using Hypothesis, including compatibility testing against the internals of upstream Apache Kafka®.
Installation
$ pip install --require-virtualenv kio
Development
Install development requirements.
$ pip install --require-virtualenv -e .[all]
The test suite contains integration tests that expects to be able to connect to an
Apache Kafka® instance running on 127.0.0.1:9092
. There is a Docker Compose file in
container/compose.yml
that you can use to conveniently start up an instance.
$ docker compose up -d kafka
Run tests.
$ python3 -X dev -m pytest --cov
Setup pre-commit to run on push.
$ pre-commit install -t pre-push
[!WARNING]
Building the schema will delete thesrc/kio/schema
directory and recreate it again, hence all of the files under this directory will be deleted. Make sure to not put unrelated files there and accidentally wipe out your own work.
Fetch, generate, and format schema.
$ make build-schema
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file kio-0.3.0.tar.gz
.
File metadata
- Download URL: kio-0.3.0.tar.gz
- Upload date:
- Size: 139.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cffa0016bea2e9ccf07f09eba831996e9760029ac2edb098f1b1bd48912a108a |
|
MD5 | 1fc2b0efd88c8185f4333eaa279e463c |
|
BLAKE2b-256 | 81b0755a6f885b3e8662ced78d42a53d7e17ab7cab247f7bae1a9d92ff4dd3a7 |
Provenance
The following attestation bundles were made for kio-0.3.0.tar.gz
:
Publisher:
release.yaml
on Aiven-Open/kio
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
kio-0.3.0.tar.gz
- Subject digest:
cffa0016bea2e9ccf07f09eba831996e9760029ac2edb098f1b1bd48912a108a
- Sigstore transparency entry: 145857549
- Sigstore integration time:
- Predicate type:
File details
Details for the file kio-0.3.0-py3-none-any.whl
.
File metadata
- Download URL: kio-0.3.0-py3-none-any.whl
- Upload date:
- Size: 718.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 91cea0b8f3555cc73e72d040d7e74dc6c31d9c6563c4d73b64c5ef796ab887a7 |
|
MD5 | c680c55e311db8a8d5f073a00630b283 |
|
BLAKE2b-256 | 75c6f9d2ca53c01233c9fe946de8861a8dea31ff639ff6d0361a4c2d3a6e6c22 |
Provenance
The following attestation bundles were made for kio-0.3.0-py3-none-any.whl
:
Publisher:
release.yaml
on Aiven-Open/kio
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
kio-0.3.0-py3-none-any.whl
- Subject digest:
91cea0b8f3555cc73e72d040d7e74dc6c31d9c6563c4d73b64c5ef796ab887a7
- Sigstore transparency entry: 145857551
- Sigstore integration time:
- Predicate type: