feat: introduce pydantic-settings for config definition and validation (#5202)

Co-authored-by: -LAN- <laipz8200@outlook.com>
This commit is contained in:
Bowen Liang 2024-06-19 13:41:12 +08:00 committed by GitHub
commit 3cc6093e4b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
21 changed files with 772 additions and 227 deletions

View file

@ -0,0 +1,16 @@
from pydantic import BaseModel, Field
class DeploymentConfigs(BaseModel):
"""
Deployment configs
"""
EDITION: str = Field(
description='deployment edition',
default='SELF_HOSTED',
)
DEPLOY_ENV: str = Field(
description='deployment environment, default to PRODUCTION.',
default='PRODUCTION',
)