forked from Samwalton9/OCLC-Analysis
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathconfig.py
More file actions
21 lines (18 loc) · 744 Bytes
/
config.py
File metadata and controls
21 lines (18 loc) · 744 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
from datetime import date
from dotenv import load_dotenv, dotenv_values
from os import getenv
load_dotenv()
class Config:
hostname = str(getenv("hostname", "ezproxy.dev.localdomain:2048"))
user = str(getenv("user", "someuser"))
password = str(getenv("password", "somepass"))
start_date = date.fromisoformat(str(getenv("start_date", 20240101)))
end_date = date.fromisoformat(str(getenv("end_date", 20240630)))
log_level = str(getenv("log_level", "error")).upper()
twlight_db = {
"db": str(getenv("twlight_db")),
"user": str(getenv("twlight_db_user")),
"pw": str(getenv("twlight_db_pw")),
"host": str(getenv("twlight_db_host")),
"port": int(getenv("twlight_db_port")),
}