-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.py
28 lines (21 loc) · 797 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
"""
Configuration module for the Face Detection API
This module defines configuration settings for the application.
It uses environment variables for configuration with sensible defaults.
"""
import os
from dotenv import load_dotenv
load_dotenv()
class Config:
"""Base configuration settings for the application."""
# Database settings
DATABASE_PATH = os.getenv("database_path", "data/face_detection.db")
JOB_EXPIRE_AFTER = int(
os.getenv("job_expire_after", 3600)
) # Default 1 hour in seconds
# Application settings
PREDICTOR_PATH = os.getenv(
"predictor_path", "data/shape_predictor_68_face_landmarks.dat"
)
DEBUG = os.getenv("debug", "False").lower() == "true"
IMAGE_STORAGE_PATH = os.getenv("image_storage_path", "data/images")