Skip to main content

Python data types for the Apache Kafka® Protocol.

Project description

kio

CI Build Status Code coverage report
PyPI Package Python versions

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 the src/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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kio-0.5.0.tar.gz (148.1 kB view details)

Uploaded Source

Built Distribution

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

kio-0.5.0-py3-none-any.whl (724.5 kB view details)

Uploaded Python 3

File details

Details for the file kio-0.5.0.tar.gz.

File metadata

  • Download URL: kio-0.5.0.tar.gz
  • Upload date:
  • Size: 148.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for kio-0.5.0.tar.gz
Algorithm Hash digest
SHA256 ec053fcca0e1317f43d9d8ce3512ca73f2bc5e5f27fc5516c83cf9cc3341446e
MD5 6eaf0c8842fcd9f979a80bd52d5dcaa0
BLAKE2b-256 e57cb1f7a2fd872deb77ab01b9f7efb2d614f262ae5f836c3f2b326fce969ad1

See more details on using hashes here.

Provenance

The following attestation bundles were made for kio-0.5.0.tar.gz:

Publisher: release.yaml on Aiven-Open/kio

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file kio-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: kio-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 724.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for kio-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7821dc09a252d35d174eef1ef5ac4d0decd647ce6a09f708aff94e46915188f0
MD5 cd041aad598012ddae54222e159b4892
BLAKE2b-256 4e5699640dfaff2cb0ea64e47725dd1747df1800984355a5bd050e327c9fc704

See more details on using hashes here.

Provenance

The following attestation bundles were made for kio-0.5.0-py3-none-any.whl:

Publisher: release.yaml on Aiven-Open/kio

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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