This is core Sentinel server infrastructure library implementing common functionalities for all Sentinel boxes such as:
- ZMQ networking
- Common configuration framework
- Logging in standardized way (necessary to handle log messages by TM - Turris Monitoring)
- Message queue for handling messages in safe and good-performing way
- Boxes monitoring
- pyzmq - Python bindings for ØMQ
- msgpack - MessagePack (an efficient binary serialization format) for Python
Build system, dependency management, packaging:
Dev tools:
Tests:
Install poetry
:
curl --silent --show-error --location https://install.python-poetry.org | python3 -
Create virtual environment by tool of your choice and activate it e.g.:
poetry shell
Install the project and its dependencies in a virtual environment:
poetry install
Formating:
black .
Sorting imports:
isort .
Linting:
flake8p .
Type check:
mypy .
To run tests:
pytest -v
To generate coverage report:
pytest --cov=turris_sentinel_network/
To see how you can use it to implement a server infrastructure box see usage and examples folder.