-
Notifications
You must be signed in to change notification settings - Fork 8
/
config.py
34 lines (22 loc) · 833 Bytes
/
config.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
from dotenv import load_dotenv
load_dotenv()
import json
import os
google_service_account = None
# check if file exists;
if os.path.exists('GOOGLE_SERVICE_ACCOUNT.json'):
google_service_account = json.load(open('GOOGLE_SERVICE_ACCOUNT.json'))
mqtt_url = os.environ.get('MQTT_URL')
ha_webhook_notifs = os.environ.get('HA_WEBHOOK_NOTIFS')
discord_token = os.environ.get('DISCORD_TOKEN')
cat_token = os.environ.get('THECATAPI_KEY')
prefix = os.environ.get('BOT_PREFIX')
COBALT_URL = os.environ.get('COBALT_URL')
# setthe DATABASE_URL env var
db_full_url = os.environ.get("DATABASE_URL")
# OR set all of these:
db_user = os.environ.get("POSTGRES_USER")
db_pw = os.environ.get("POSTGRES_PASSWORD")
db_name = os.environ.get("POSTGRES_DB")
db_host = os.environ.get("POSTGRES_HOST")
db_port = os.environ.get("POSTGRES_PORT")