Initial Commit
This commit is contained in:
parent
1fa5159c8b
commit
29564f0e0b
11 changed files with 1270 additions and 2210 deletions
14
config.py
14
config.py
|
|
@ -1,5 +1,9 @@
|
|||
from pydantic_settings import BaseSettings, SettingsConfigDict
|
||||
from cryptography.fernet import Fernet
|
||||
from pathlib import Path
|
||||
import os
|
||||
|
||||
BASE_DIR = Path(__file__).resolve().parent
|
||||
|
||||
class Settings(BaseSettings):
|
||||
port: int = 5000
|
||||
|
|
@ -15,7 +19,15 @@ class Settings(BaseSettings):
|
|||
twitter_client_secret: str
|
||||
twitter_redirect_uri: str
|
||||
|
||||
model_config = SettingsConfigDict(env_file=".env", extra="ignore")
|
||||
model_config = SettingsConfigDict(
|
||||
env_file=[
|
||||
os.path.join(os.getcwd(), ".env"),
|
||||
#fallback
|
||||
BASE_DIR / ".env"
|
||||
],
|
||||
env_file_encoding='utf-8',
|
||||
extra="ignore"
|
||||
)
|
||||
cookie_secure: bool = True
|
||||
webhook_url: str
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue