A Python implementation for the SOARCA FIN, compatible with: SOARCA the TNO orchestrator for Open-C2, CACAO and STIX For more information about the SOARCA, we refer the reader to the website of the SOARCA project. For more in depth documentation, see the documentation page on here.
Usage of this SOARCA Fin Library is described here.
An example is given in this project in the file examples/pong_example.py
Want to contribute to this project? Please keep in mind the following rules:
- This repository uses git rebase strategy
- For each PR, there should be at least one issue
- Make sure all tests pass (including lint errors)
- Python3
- Poetry
In order to run the project, create an .env
file in the root of the project with the following entries:
MQTT_BROKER = "{INSERT_MQTT_BROKER_URL_HERE}"
MQTT_PORT = "{INSERT_MQTT_PORT_HERE}"
MQTT_USERNAME = "{INSERT_USERNAME_HERE}"
MQTT_PASSWD = "{INSERT_PASSWORD_HERE}"
If no .env
file is specified, the following default values will be used:
MQTT_BROKER = "localhost"
MQTT_PORT = "1883"
MQTT_USERNAME = "soarca"
MQTT_PASSWD = "password"
To handle dependencies in this project, the package Poetry is used. To install Poetry execute the following command:
pip3 install poetry
To install the dependencies from the pyproject.toml
either enter a poetry shell, create a virtual environment or use poetry run.
To enter a poetry shell execute the following command in the root of the project:
poetry shell
To install the dependencies in a poetry shell or create a virtual environment, run:
poetry install
To quick run the project, either run it through poetry run or a poetry shell.
poetry run python examples/pong_example.py
python examples/pong_example.py
To run the tests in this repository use:
poetry run python -m unittest
To run python linter, first install pylint and then run pylint with the following arguments:
poetry add pylint &&
poetry run pylint --disable=R,C $(git ls-files '*.py')
To format the code base, first install ruff and then run ruff:
poetry add ruff &&
poetry run ruff format