-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.py
32 lines (26 loc) · 1.11 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
# config.py
import os
class Config:
SECRET_KEY = os.environ.get("SECRET_KEY", "your_secret_key")
# Base directory for Seigr configurations and data storage
SEIGR_DIRECTORY = os.path.expanduser("~/.seigr")
# Paths updated to use .seigr extension
SEIGR_ID_PATH = os.path.join(SEIGR_DIRECTORY, "seigr_id.protobuf")
PING_LOG_PATH = os.path.join(
SEIGR_DIRECTORY, "ping_logs.protobuf"
) # Updated to protobuf for ping logs
# Other directories
LOG_DIRECTORY = os.path.join(SEIGR_DIRECTORY, "logs")
CLUSTER_DIRECTORY = os.path.join(SEIGR_DIRECTORY, "seed_clusters")
UPLOAD_FOLDER = os.path.join(SEIGR_DIRECTORY, "uploads")
SEIGR_ID_DIRECTORY = os.path.join(
SEIGR_DIRECTORY, "test_ids"
) # Add a directory for identity testing
# Ensure all necessary directories exist
os.makedirs(SEIGR_DIRECTORY, exist_ok=True)
os.makedirs(LOG_DIRECTORY, exist_ok=True)
os.makedirs(CLUSTER_DIRECTORY, exist_ok=True)
os.makedirs(UPLOAD_FOLDER, exist_ok=True)
os.makedirs(
SEIGR_ID_DIRECTORY, exist_ok=True
) # Ensure test identity directory exists