Skip to main content

SOARCA FIN lib allows for extending custom SOARCA capabilities through a python library

Project description

SOARCA Fin Library

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.

Quick Use

Usage of this SOARCA Fin Library is described here.

Example

An example is given in this project in the file examples/pong_example.py

Contributing

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)

Running this repository

Requirements

  • Python3
  • Poetry

Setup

Env File

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

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

Quick Run

To quick run the project, either run it through poetry run or a poetry shell.

Poetry Run

poetry run python examples/pong_example.py

Poetry Shell

python examples/pong_example.py

Running tests

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

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

soarca_fin_library-1.0.0.tar.gz (14.6 kB view hashes)

Uploaded Source

Built Distribution

soarca_fin_library-1.0.0-py3-none-any.whl (23.7 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