A Python routing library for building rule based configurable routing systems.
See notebooks/deimos-guide.ipynb for instructions.
- Clone the repository:
git clone https://github.com/withmartian/deimos-router
cd deimos-router- Install with uv (recommended):
uv venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
uv sync --devOr with pip:
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
pip install -e ".[dev]"Deimos Router requires API credentials to function. You need to provide:
- API URL: The base URL of your API endpoint
- API Key: Your authentication key
There are several ways to provide your API credentials, listed in order of precedence:
secrets.json
{
"api_url": "https://api.withmartian.com/v1",
"api_key": "sk-XXXxXxXxxxxxXXX"
}Set the following environment variables:
export DEIMOS_API_URL="https://api.withmartian.com/v1"
export DEIMOS_API_KEY="sk-XXXxXxXxxxxxXXX"On Windows:
set DEIMOS_API_URL=https://api.withmartian.com/v1
set DEIMOS_API_KEY=sk-XXXxXxXxxxxxXXXYou can also place a secrets.json file in your home directory (~/secrets.json) for system-wide configuration.