-
Notifications
You must be signed in to change notification settings - Fork 7
/
config.py
51 lines (43 loc) · 1.86 KB
/
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
from os import getenv
from datetime import timedelta
from models.enums import NoHarmENV
class Config:
VERSION = "v4.13-beta"
FRONTEND_VERSION = "4.0.10"
ENV = getenv("ENV") or NoHarmENV.DEVELOPMENT.value
SECRET_KEY = getenv("SECRET_KEY") or "secret_key"
API_KEY = getenv("API_KEY") or ""
SELF_API_URL = getenv("SELF_API_URL") or ""
APP_URL = getenv("APP_URL")
APP_DOMAIN = getenv("APP_DOMAIN") or "localhost"
POTGRESQL_CONNECTION_STRING = (
getenv("POTGRESQL_CONNECTION_STRING")
or "postgresql://postgres@localhost/noharm"
)
REPORT_CONNECTION_STRING = (
getenv("REPORT_CONNECTION_STRING") or "postgresql://postgres@localhost/noharm"
)
JWT_ACCESS_TOKEN_EXPIRES = timedelta(
minutes=int(getenv("JWT_ACCESS_TOKEN_EXPIRES", 20))
)
JWT_REFRESH_TOKEN_EXPIRES = timedelta(
days=int(getenv("JWT_REFRESH_TOKEN_EXPIRES", 30))
)
MAIL_USERNAME = getenv("MAIL_USERNAME") or "user@gmail.com"
MAIL_PASSWORD = getenv("MAIL_PASSWORD") or "password"
MAIL_SENDER = getenv("MAIL_SENDER") or "user@gmail.com"
MAIL_HOST = getenv("MAIL_HOST") or "localhost"
CACHE_BUCKET_NAME = getenv("CACHE_BUCKET_NAME") or ""
CACHE_BUCKET_ID = getenv("CACHE_BUCKET_ID") or ""
CACHE_BUCKET_KEY = getenv("CACHE_BUCKET_KEY") or ""
ODOO_API_DB = getenv("ODOO_API_DB") or ""
ODOO_API_KEY = getenv("ODOO_API_KEY") or ""
ODOO_API_URL = getenv("ODOO_API_URL") or ""
ODOO_API_USER = getenv("ODOO_API_USER") or ""
OPEN_AI_API_ENDPOINT = getenv("OPEN_AI_API_ENDPOINT") or ""
OPEN_AI_API_KEY = getenv("OPEN_AI_API_KEY") or ""
OPEN_AI_API_VERSION = getenv("OPEN_AI_API_VERSION") or ""
OPEN_AI_API_MODEL = getenv("OPEN_AI_API_MODEL") or ""
MARITACA_API_KEY = getenv("MARITACA_API_KEY") or ""
REDIS_HOST = getenv("REDIS_HOST") or ""
REDIS_PORT = getenv("REDIS_PORT") or ""