29 lines
666 B
Python
29 lines
666 B
Python
from pydantic_settings import BaseSettings
|
|
from pathlib import Path
|
|
|
|
|
|
class Settings(BaseSettings):
|
|
API_V0_STR: str = '/api/v0'
|
|
|
|
# JSON Web Tokens (https://jwt.io) - Secret utilized for token generation
|
|
JWT_SECRET: str = 'qS96E1oCfq5gEZH-ngD91NC2qkcl0cffhNTIDGpF4pw'
|
|
# Token was generated by the code below:
|
|
"""
|
|
import secrets
|
|
|
|
token: str = secrets.token_urlsafe(32) # com 32 caracteres
|
|
"""
|
|
ALGORITHM: str = 'HS256'
|
|
# Token timeout with 1h
|
|
ACCESS_TOKEN_EXPIRE_MINUTES: int = 60
|
|
|
|
JOBS_FILE_PATH: Path = 'jobs'
|
|
|
|
BASE_PATH: Path = '.'
|
|
|
|
class Config:
|
|
case_sensitive = True
|
|
|
|
settings: Settings = Settings()
|
|
|