init
This commit is contained in:
35
app/config.py
Normal file
35
app/config.py
Normal file
@@ -0,0 +1,35 @@
|
||||
from pydantic_settings import BaseSettings
|
||||
from typing import Literal
|
||||
|
||||
|
||||
class Settings(BaseSettings):
|
||||
# Database
|
||||
database_url: str = "postgresql://user:password@localhost:5432/datalake"
|
||||
|
||||
# Storage Backend
|
||||
storage_backend: Literal["s3", "minio"] = "minio"
|
||||
|
||||
# AWS S3
|
||||
aws_access_key_id: str = ""
|
||||
aws_secret_access_key: str = ""
|
||||
aws_region: str = "us-east-1"
|
||||
s3_bucket_name: str = "test-artifacts"
|
||||
|
||||
# MinIO
|
||||
minio_endpoint: str = "localhost:9000"
|
||||
minio_access_key: str = "minioadmin"
|
||||
minio_secret_key: str = "minioadmin"
|
||||
minio_bucket_name: str = "test-artifacts"
|
||||
minio_secure: bool = False
|
||||
|
||||
# Application
|
||||
api_host: str = "0.0.0.0"
|
||||
api_port: int = 8000
|
||||
max_upload_size: int = 524288000 # 500MB
|
||||
|
||||
class Config:
|
||||
env_file = ".env"
|
||||
case_sensitive = False
|
||||
|
||||
|
||||
settings = Settings()
|
||||
Reference in New Issue
Block a user