mb
2 years ago
5 changed files with 29 additions and 25 deletions
@ -0,0 +1,17 @@ |
|||
import os |
|||
from dotenv import load_dotenv |
|||
|
|||
# Load environment variables from the .env file |
|||
load_dotenv() |
|||
|
|||
# Bind them to Python variables |
|||
PORTNUMBER = int(os.environ.get('OCTOMODE_PORTNUMBER', 5001)) |
|||
PAD_URL = os.environ.get('OCTOMODE_PAD_URL', 'https://pad.vvvvvvaria.org') |
|||
PAD_API_URL = os.environ.get('OCTOMODE_PAD_API_URL', 'https://pad.vvvvvvaria.org/api/1.2.15') |
|||
PAD_API_KEY = os.environ.get('OCTOMODE_PAD_API_KEY', '') |
|||
|
|||
# Check if API key is provided |
|||
if not PAD_API_KEY or PAD_API_KEY == "XXX": |
|||
print("error: you must provide a value for OCTOMODE_PAD_API_KEY") |
|||
print("error: e.g. export OCTOMODE_PAD_API_KEY=...") |
|||
exit(1) |
Loading…
Reference in new issue