-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.py
29 lines (21 loc) · 842 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
import os
import logging
from dotenv import load_dotenv
logging.basicConfig(level=logging.DEBUG)
# Load variabel lingkungan dari file .env
load_dotenv()
class Config:
SECRET_KEY = os.getenv('SECRET_KEY') or '5f957e6105f189f9974ae631b351b321'
# Database Configuration
DB_HOST = os.getenv('DB_HOST')
DB_PORT = os.getenv('DB_PORT', '3306')
DB_USER = os.getenv('DB_USER')
DB_PASSWORD = os.getenv('DB_PASSWORD')
DB_NAME = os.getenv('DB_NAME')
# SendGrid Configuration
SENDGRID_API_KEY = os.getenv('SENDGRID_API_KEY')
SENDGRID_DEFAULT_FROM = os.getenv('SENDGRID_DEFAULT_FROM')
# WAPISender Configuration
WAPISENDER_API_URL = os.getenv('WAPISENDER_API_URL')
WAPISENDER_API_KEY = os.getenv('WAPISENDER_API_KEY')
WAPISENDER_DEVICE_KEY = os.getenv('WAPISENDER_DEVICE_KEY')