33 lines
692 B
Python
33 lines
692 B
Python
from pydantic import BaseSettings
|
|
from typing import Optional
|
|
import os
|
|
|
|
from pydantic.fields import T
|
|
|
|
|
|
class Settings(BaseSettings):
|
|
app_name: str = "Kingsome API"
|
|
admin_email: str = "pengtao@kingsome.cn"
|
|
items_per_user: int = 50
|
|
is_debug: bool = True
|
|
|
|
redis_host: str = "10.10.3.10" # reids 服务器IP
|
|
redis_port: int = 6379 # redis 端口
|
|
redis_db: int = 4 # redis db
|
|
|
|
|
|
x_token: str = "abc"
|
|
|
|
root_path_in_servers: Optional[bool] = False
|
|
root_path: str = '/api/v1'
|
|
|
|
origins: list = [
|
|
"http://*.kingsome.cn",
|
|
"https://*.kingsome.cn",
|
|
"http://localhost",
|
|
"http://localhost:8080",
|
|
]
|
|
|
|
|
|
settings = Settings()
|