nomadro/apps/api/services/ebook_svc/config.py
eric 3e5b7c2098 Monorepo super-optimize: src layout, workspace scripts, docs.
Collapse portal under src/, unify pnpm workspace/scripts, thin VIP topic re-exports, drop orphan vip scaffolds and one-shot scripts, ignore xhs/release, document root commands.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-01 00:34:04 +08:00

55 lines
1.8 KiB
Python
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

from pydantic_settings import BaseSettings, SettingsConfigDict
class Settings(BaseSettings):
model_config = SettingsConfigDict(env_file=".env", env_file_encoding="utf-8", extra="ignore")
app_name: str = "nomadmini-api"
debug: bool = True
api_host: str = "0.0.0.0"
api_port: int = 8000
public_api_base: str = "https://api.nomadro.cn"
admin_origin: str = "https://admin.nomadro.cn"
cors_origins: str = "https://admin.nomadro.cn,http://localhost:5173,http://127.0.0.1:5173"
# WeChat
wx_appid: str = "wxa55815dd741a540d"
wx_secret: str = "bf71025c209e7567d49268bc427ba22b"
wx_offer_id: str = "1450642200"
wx_app_key: str = "CBi5tdkkSWuvkDvWJNnSjrGmeYE3xlsg"
wx_sandbox_app_key: str = "0wB3HV3sfKVTEgomZ6BIbgsN8Mlbv5Bn"
wx_pay_env: int = 0 # 0 现网 / 1 沙箱
# JWT / Admin
jwt_secret: str = "nomadro-jwt-local-dev-2026"
admin_username: str = "admin"
admin_password: str = "Xiao4669805"
# PocketBase
pb_url: str = "http://127.0.0.1:8090"
pb_admin_email: str = "admin@nomadro.cn"
pb_admin_password: str = "Xiao4669805"
use_pocketbase: bool = False
sqlite_path: str = "../data/nomadmini.db"
# 抖音 platforms.tt 写入路径(默认自动探测门户 remote-config.json)
tt_remote_config_path: str = ""
default_product_id: str = "youtube"
default_price_fen: int = 18800
default_unlock_percent: int = 30
wx_push_token: str = "hackrobot"
wx_push_encoding_aes_key: str = "ulnyydH8LF4uWmdpzSgUiWS6hVXp1V3wp26MhEYeHkI"
wx_allow_devtools_login: bool = True
# ntfy(自建 https://ntfy.nomadro.cn)
ntfy_enabled: bool = True
ntfy_base_url: str = "http://127.0.0.1:2586" # 机内直连,避免自签/回环 HTTPS
ntfy_topic: str = "nomadmini"
ntfy_token: str = ""
settings = Settings()