-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfig.py
30 lines (22 loc) · 851 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
# © 2024 Viktor Hamretskyi <[email protected]>
# All rights reserved.
# This code is licensed under the MIT License. See LICENSE file for details.
import os
import logging.config
from dotenv import load_dotenv
from db.setup import create_database_and_tables
logging.config.fileConfig("logging.conf")
# Load environment variables from .env file
load_dotenv()
steam_api_key = os.getenv("STEAM_API_KEY")
opendota_key = os.getenv("OPENDOTA_KEY")
telegram_key = os.getenv("TELEGRAM_KEY")
DATABASE_CONFIG = {
"DB_NAME": os.getenv("POSTGRES_DB", "mydatabase"),
"USER": os.getenv("POSTGRES_USER", "myuser"),
"PASSWORD": os.getenv("POSTGRES_PASSWORD", "mypassword"),
"HOST": os.getenv("DB_HOST", "localhost"),
"PORT": os.getenv("DB_PORT", "5432"),
}
create_database_and_tables(DATABASE_CONFIG)
incremental_learning_batch = 50