Giter VIP home page Giter VIP logo

kio's Introduction

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 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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.