https://github.com/brianlusina/konsensus
Simple clustering by consensus protocol proof of concept library in Python
https://github.com/brianlusina/konsensus
consensus hacktoberfest paxos paxos-protocol python python3
Last synced: 2 days ago
JSON representation
Simple clustering by consensus protocol proof of concept library in Python
- Host: GitHub
- URL: https://github.com/brianlusina/konsensus
- Owner: BrianLusina
- License: mit
- Created: 2023-02-28T07:02:55.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2025-04-02T09:23:00.000Z (24 days ago)
- Last Synced: 2025-04-02T10:31:26.454Z (24 days ago)
- Topics: consensus, hacktoberfest, paxos, paxos-protocol, python, python3
- Language: Python
- Homepage: https://pypi.org/project/konsensus/
- Size: 488 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: .github/CONTRIBUTING.md
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
- Codeowners: .github/CODEOWNERS
- Security: .github/SECURITY.md
Awesome Lists containing this project
README
# Konsensus
[](https://github.com/BrianLusina/konsensus/actions/workflows/lint.yml)
[](https://github.com/BrianLusina/konsensus/actions/workflows/tests.yaml)
[](https://codecov.io/gh/BrianLusina/konsensus)
[](https://github.com/BrianLusina/konsensus/actions/workflows/build.yaml)
[](https://github.com/BrianLusina/konsensus/actions/workflows/publish.yaml)
[](https://github.com/BrianLusina/konsensus/actions/workflows/codeql.yaml)
[](https://github.com/brianlusina/konsensus/releases)
[](https://www.python.org/)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+](https://www.python.org/)
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](https://github.com/pyenv/pyenv).2. [Poetry](https://python-poetry.org/)
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](https://virtualenv.pypa.io/)
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:
```shell
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](./konsensus) directory.
## Running
There is a simple script in the project root [run.py](./run.py) that contains a sample setup on how to use the library.
It can be run with:```shell
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](./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](./.github/CONTRIBUTING.md) to learn how to contribute to this project.
## Versioning
[Semantic versioning](https://semver/) is used to track the version of the project.