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.

Features

  • Exposes immutable dataclass entities for all protocol messages, generated from the same source as used internally in Apache Kafka®.
  • Message classes are simply light-weight data containers and does not inherit anything or expose any methods other than a vanilla dataclass. Encoding and decoding is enabled by making all the necessary details about Kafka encoding introspectable.
  • Supports encoding and decoding of messages through IO[bytes].
  • Test suite with focus on roundtrip property tests using Hypothesis.

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 --file=container/compose.yml up -d

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.0.0a3.tar.gz (109.3 kB view details)

Uploaded Source

Built Distribution

kio-0.0.0a3-py3-none-any.whl (617.5 kB view details)

Uploaded Python 3

File details

Details for the file kio-0.0.0a3.tar.gz.

File metadata

  • Download URL: kio-0.0.0a3.tar.gz
  • Upload date:
  • Size: 109.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.8

File hashes

Hashes for kio-0.0.0a3.tar.gz
Algorithm Hash digest
SHA256 bf06aa70650552e20c0a52757293d60b2e6e4038201bf3d327b1c6006e7161b7
MD5 09f9de655d793bfa4e53757324b32ac0
BLAKE2b-256 0c98b5934810c9b45af14130fdbfe68e15d545cd7b2bb980fa9ecdb12c389f22

See more details on using hashes here.

File details

Details for the file kio-0.0.0a3-py3-none-any.whl.

File metadata

  • Download URL: kio-0.0.0a3-py3-none-any.whl
  • Upload date:
  • Size: 617.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.8

File hashes

Hashes for kio-0.0.0a3-py3-none-any.whl
Algorithm Hash digest
SHA256 d628bae9a7cd334f6d98d228e3d6cb5c8cc0a6ff9ca712fec8a9bdf1eafc2749
MD5 c8cdcf5b8cf9895b95afb0be826e3ec3
BLAKE2b-256 60fcda2ae7c47a9332dc92b45f936dda280ff0e38cdd398ca17b7e8f2db2e608

See more details on using hashes here.

Supported by

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