-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathconfig.py
More file actions
29 lines (22 loc) · 812 Bytes
/
config.py
File metadata and controls
29 lines (22 loc) · 812 Bytes
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
from pydantic import BaseSettings
from pydantic.networks import AnyUrl
BASE_DIR: str = os.path.dirname(os.path.abspath(__file__))
class Settings(BaseSettings):
SECRET_KEY: str = "some-random-unique-secret-key"
DATABASE_URI: AnyUrl = "mysql+mysqldb://root:password@mariadb/climsoft"
FILE_STORAGE: str = "disk"
UPLOAD_DIR: str = "/climsoft_uploads"
S3_BUCKET: str = "s3-bucket-name"
AWS_REGION: str = "eu-west-2"
AWS_ACCESS_KEY_ID: str = "replace it"
AWS_SECRET_ACCESS_KEY: str = "replace it"
S3_SIGNED_URL_VALIDITY: int = 6
MOUNT_STATIC: bool = True
MYSQL_DEFAULT_USER: str = "root"
AUTH_ENABLED: bool = True
class Config:
env_prefix = "CLIMSOFT_"
case_sensitive = True
env_file_encoding = "utf-8"
settings = Settings()