example.py
includes example configurations and classes for a basic connector. The example will read in custom
configuration values from example.yaml
, create a connection to InOrbit based on the environment variables in
example.env
, and create a custom execution loop that:
- Publishes the connector_config as a
robot_key_value
topic - Publishes random CPU/RAM/HDD usage values
To run the example:
- Create an InOrbit API Key and add it to
example.env
- Install the
inorbit_connector
library in a virtual environment:virtualenv .venv source .venv/bin/activeate pip install .
- Source your environment file:
source scripts/example.env
- Run the example connector:
python scripts/example.py
To kill the connector, use ctrl-c
in the terminal.