Skip to main content

Simple clustering by consensus library

Project description

Konsensus

Lint Tests codecov Build Publish CodeQL Version Python

A simple clustering by consensus library in Python. This is a simple implementation of a replicated state machine using a Paxos-derived algorithm.

Getting Started

Ensure you have the following first before you proceed:

  1. Python 3.10+

    You will require Python 3.10+ to run this project. If you are using a different version of Python, you will need to update your Python version to 3.10+. You can check your Python version by running python --version in your terminal. There are ways to install different versions of Python on your system and this can be done using pyenv.

  2. Poetry

    Poetry is a Python package manager that is used to manage dependencies. You can check the installation instructions in the link provided to get this setup.

  3. Virtualenv

    Not a hard requirement as poetry should setup a virtual environment for you, but can be used as well to setup a virtual environment.

Once you have dependencies setup, run the below command to install dependencies:

poetry install

Even though this implementation has 0 dependencies to external packages, the dev packages are used for linting & handling tests. Therefore, this is useful when running linting & test commands.

The library itself is in the konsensus directory.

Running

There is a simple script in the project root run.py that contains a sample setup on how to use the library. It can be run with:

python run.py 10

10 is the seed value, this can be any other value like 20 or 30, etc

There are other scripts available in the Makefile that can be used to run formatting, linting, test or build commands.

Built With

Tool Purpose
Python Programming Language
Poetry Dependency & Package manager

Contributing

Please read the contributing guide to learn how to contribute to this project.

Versioning

Semantic versioning is used to track the version of the project.

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

konsensus-0.1.4.tar.gz (13.8 kB view hashes)

Uploaded Source

Built Distribution

konsensus-0.1.4-py3-none-any.whl (19.4 kB view hashes)

Uploaded Python 3

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