init commit
This commit is contained in:
5
.history/app/core/__init___20251210201602.py
Normal file
5
.history/app/core/__init___20251210201602.py
Normal file
@@ -0,0 +1,5 @@
|
||||
"""Core module - configuration and utilities"""
|
||||
|
||||
from app.core.config import Settings
|
||||
|
||||
__all__ = ["Settings"]
|
||||
5
.history/app/core/__init___20251210202255.py
Normal file
5
.history/app/core/__init___20251210202255.py
Normal file
@@ -0,0 +1,5 @@
|
||||
"""Core module - configuration and utilities"""
|
||||
|
||||
from app.core.config import Settings
|
||||
|
||||
__all__ = ["Settings"]
|
||||
43
.history/app/core/config_20251210201604.py
Normal file
43
.history/app/core/config_20251210201604.py
Normal file
@@ -0,0 +1,43 @@
|
||||
"""Application configuration using pydantic-settings"""
|
||||
|
||||
from typing import Optional
|
||||
from pydantic_settings import BaseSettings
|
||||
from functools import lru_cache
|
||||
|
||||
|
||||
class Settings(BaseSettings):
|
||||
"""Main application settings"""
|
||||
|
||||
# Bot Configuration
|
||||
bot_token: str
|
||||
bot_admin_id: int
|
||||
|
||||
# Database Configuration
|
||||
database_url: str
|
||||
database_echo: bool = False
|
||||
|
||||
# Redis Configuration
|
||||
redis_url: str = "redis://localhost:6379/0"
|
||||
|
||||
# Application Configuration
|
||||
app_debug: bool = False
|
||||
app_env: str = "development"
|
||||
log_level: str = "INFO"
|
||||
|
||||
# API Configuration
|
||||
api_host: str = "0.0.0.0"
|
||||
api_port: int = 8000
|
||||
|
||||
# Timezone
|
||||
tz: str = "Europe/Moscow"
|
||||
|
||||
class Config:
|
||||
env_file = ".env"
|
||||
env_file_encoding = "utf-8"
|
||||
case_sensitive = False
|
||||
|
||||
|
||||
@lru_cache()
|
||||
def get_settings() -> Settings:
|
||||
"""Get cached settings instance"""
|
||||
return Settings()
|
||||
43
.history/app/core/config_20251210202255.py
Normal file
43
.history/app/core/config_20251210202255.py
Normal file
@@ -0,0 +1,43 @@
|
||||
"""Application configuration using pydantic-settings"""
|
||||
|
||||
from typing import Optional
|
||||
from pydantic_settings import BaseSettings
|
||||
from functools import lru_cache
|
||||
|
||||
|
||||
class Settings(BaseSettings):
|
||||
"""Main application settings"""
|
||||
|
||||
# Bot Configuration
|
||||
bot_token: str
|
||||
bot_admin_id: int
|
||||
|
||||
# Database Configuration
|
||||
database_url: str
|
||||
database_echo: bool = False
|
||||
|
||||
# Redis Configuration
|
||||
redis_url: str = "redis://localhost:6379/0"
|
||||
|
||||
# Application Configuration
|
||||
app_debug: bool = False
|
||||
app_env: str = "development"
|
||||
log_level: str = "INFO"
|
||||
|
||||
# API Configuration
|
||||
api_host: str = "0.0.0.0"
|
||||
api_port: int = 8000
|
||||
|
||||
# Timezone
|
||||
tz: str = "Europe/Moscow"
|
||||
|
||||
class Config:
|
||||
env_file = ".env"
|
||||
env_file_encoding = "utf-8"
|
||||
case_sensitive = False
|
||||
|
||||
|
||||
@lru_cache()
|
||||
def get_settings() -> Settings:
|
||||
"""Get cached settings instance"""
|
||||
return Settings()
|
||||
48
.history/app/core/config_20251210203345.py
Normal file
48
.history/app/core/config_20251210203345.py
Normal file
@@ -0,0 +1,48 @@
|
||||
"""Application configuration using pydantic-settings"""
|
||||
|
||||
from typing import Optional
|
||||
from pydantic_settings import BaseSettings
|
||||
from functools import lru_cache
|
||||
|
||||
|
||||
class Settings(BaseSettings):
|
||||
"""Main application settings"""
|
||||
|
||||
# Bot Configuration
|
||||
bot_token: str
|
||||
bot_admin_id: int
|
||||
|
||||
# Database Configuration
|
||||
database_url: str
|
||||
database_echo: bool = False
|
||||
|
||||
# Database Credentials (for Docker)
|
||||
db_password: Optional[str] = None
|
||||
db_user: Optional[str] = None
|
||||
db_name: Optional[str] = None
|
||||
|
||||
# Redis Configuration
|
||||
redis_url: str = "redis://localhost:6379/0"
|
||||
|
||||
# Application Configuration
|
||||
app_debug: bool = False
|
||||
app_env: str = "development"
|
||||
log_level: str = "INFO"
|
||||
|
||||
# API Configuration
|
||||
api_host: str = "0.0.0.0"
|
||||
api_port: int = 8000
|
||||
|
||||
# Timezone
|
||||
tz: str = "Europe/Moscow"
|
||||
|
||||
class Config:
|
||||
env_file = ".env"
|
||||
env_file_encoding = "utf-8"
|
||||
case_sensitive = False
|
||||
|
||||
|
||||
@lru_cache()
|
||||
def get_settings() -> Settings:
|
||||
"""Get cached settings instance"""
|
||||
return Settings()
|
||||
48
.history/app/core/config_20251210203358.py
Normal file
48
.history/app/core/config_20251210203358.py
Normal file
@@ -0,0 +1,48 @@
|
||||
"""Application configuration using pydantic-settings"""
|
||||
|
||||
from typing import Optional
|
||||
from pydantic_settings import BaseSettings
|
||||
from functools import lru_cache
|
||||
|
||||
|
||||
class Settings(BaseSettings):
|
||||
"""Main application settings"""
|
||||
|
||||
# Bot Configuration
|
||||
bot_token: str
|
||||
bot_admin_id: int
|
||||
|
||||
# Database Configuration
|
||||
database_url: str
|
||||
database_echo: bool = False
|
||||
|
||||
# Database Credentials (for Docker)
|
||||
db_password: Optional[str] = None
|
||||
db_user: Optional[str] = None
|
||||
db_name: Optional[str] = None
|
||||
|
||||
# Redis Configuration
|
||||
redis_url: str = "redis://localhost:6379/0"
|
||||
|
||||
# Application Configuration
|
||||
app_debug: bool = False
|
||||
app_env: str = "development"
|
||||
log_level: str = "INFO"
|
||||
|
||||
# API Configuration
|
||||
api_host: str = "0.0.0.0"
|
||||
api_port: int = 8000
|
||||
|
||||
# Timezone
|
||||
tz: str = "Europe/Moscow"
|
||||
|
||||
class Config:
|
||||
env_file = ".env"
|
||||
env_file_encoding = "utf-8"
|
||||
case_sensitive = False
|
||||
|
||||
|
||||
@lru_cache()
|
||||
def get_settings() -> Settings:
|
||||
"""Get cached settings instance"""
|
||||
return Settings()
|
||||
66
.history/app/core/config_20251210210332.py
Normal file
66
.history/app/core/config_20251210210332.py
Normal file
@@ -0,0 +1,66 @@
|
||||
"""Application configuration using pydantic-settings"""
|
||||
|
||||
from typing import Optional
|
||||
from pydantic_settings import BaseSettings
|
||||
from functools import lru_cache
|
||||
|
||||
|
||||
class Settings(BaseSettings):
|
||||
"""Main application settings"""
|
||||
|
||||
# Bot Configuration
|
||||
bot_token: str
|
||||
bot_admin_id: int
|
||||
|
||||
# Database Configuration
|
||||
database_url: str
|
||||
database_echo: bool = False
|
||||
|
||||
# Database Credentials (for Docker)
|
||||
db_password: Optional[str] = None
|
||||
db_user: Optional[str] = None
|
||||
db_name: Optional[str] = None
|
||||
|
||||
# Redis Configuration
|
||||
redis_url: str = "redis://localhost:6379/0"
|
||||
|
||||
# Application Configuration
|
||||
app_debug: bool = False
|
||||
app_env: str = "development"
|
||||
log_level: str = "INFO"
|
||||
|
||||
# API Configuration
|
||||
api_host: str = "0.0.0.0"
|
||||
api_port: int = 8000
|
||||
|
||||
# Timezone
|
||||
tz: str = "Europe/Moscow"
|
||||
|
||||
# Security Configuration
|
||||
jwt_secret_key: str = "your-secret-key-change-in-production"
|
||||
hmac_secret_key: str = "your-hmac-secret-change-in-production"
|
||||
require_hmac_verification: bool = False # Disabled by default in MVP
|
||||
access_token_expire_minutes: int = 15
|
||||
refresh_token_expire_days: int = 30
|
||||
|
||||
# CORS Configuration
|
||||
cors_allowed_origins: list[str] = ["http://localhost:3000", "http://localhost:8081"]
|
||||
cors_allow_credentials: bool = True
|
||||
cors_allow_methods: list[str] = ["GET", "POST", "PUT", "DELETE", "OPTIONS"]
|
||||
cors_allow_headers: list[str] = ["*"]
|
||||
|
||||
# Feature Flags
|
||||
feature_telegram_bot_enabled: bool = True
|
||||
feature_transaction_approval: bool = True
|
||||
feature_event_logging: bool = True
|
||||
|
||||
class Config:
|
||||
env_file = ".env"
|
||||
env_file_encoding = "utf-8"
|
||||
case_sensitive = False
|
||||
|
||||
|
||||
@lru_cache()
|
||||
def get_settings() -> Settings:
|
||||
"""Get cached settings instance"""
|
||||
return Settings()
|
||||
66
.history/app/core/config_20251210210906.py
Normal file
66
.history/app/core/config_20251210210906.py
Normal file
@@ -0,0 +1,66 @@
|
||||
"""Application configuration using pydantic-settings"""
|
||||
|
||||
from typing import Optional
|
||||
from pydantic_settings import BaseSettings
|
||||
from functools import lru_cache
|
||||
|
||||
|
||||
class Settings(BaseSettings):
|
||||
"""Main application settings"""
|
||||
|
||||
# Bot Configuration
|
||||
bot_token: str
|
||||
bot_admin_id: int
|
||||
|
||||
# Database Configuration
|
||||
database_url: str
|
||||
database_echo: bool = False
|
||||
|
||||
# Database Credentials (for Docker)
|
||||
db_password: Optional[str] = None
|
||||
db_user: Optional[str] = None
|
||||
db_name: Optional[str] = None
|
||||
|
||||
# Redis Configuration
|
||||
redis_url: str = "redis://localhost:6379/0"
|
||||
|
||||
# Application Configuration
|
||||
app_debug: bool = False
|
||||
app_env: str = "development"
|
||||
log_level: str = "INFO"
|
||||
|
||||
# API Configuration
|
||||
api_host: str = "0.0.0.0"
|
||||
api_port: int = 8000
|
||||
|
||||
# Timezone
|
||||
tz: str = "Europe/Moscow"
|
||||
|
||||
# Security Configuration
|
||||
jwt_secret_key: str = "your-secret-key-change-in-production"
|
||||
hmac_secret_key: str = "your-hmac-secret-change-in-production"
|
||||
require_hmac_verification: bool = False # Disabled by default in MVP
|
||||
access_token_expire_minutes: int = 15
|
||||
refresh_token_expire_days: int = 30
|
||||
|
||||
# CORS Configuration
|
||||
cors_allowed_origins: list[str] = ["http://localhost:3000", "http://localhost:8081"]
|
||||
cors_allow_credentials: bool = True
|
||||
cors_allow_methods: list[str] = ["GET", "POST", "PUT", "DELETE", "OPTIONS"]
|
||||
cors_allow_headers: list[str] = ["*"]
|
||||
|
||||
# Feature Flags
|
||||
feature_telegram_bot_enabled: bool = True
|
||||
feature_transaction_approval: bool = True
|
||||
feature_event_logging: bool = True
|
||||
|
||||
class Config:
|
||||
env_file = ".env"
|
||||
env_file_encoding = "utf-8"
|
||||
case_sensitive = False
|
||||
|
||||
|
||||
@lru_cache()
|
||||
def get_settings() -> Settings:
|
||||
"""Get cached settings instance"""
|
||||
return Settings()
|
||||
70
.history/app/core/config_20251210211749.py
Normal file
70
.history/app/core/config_20251210211749.py
Normal file
@@ -0,0 +1,70 @@
|
||||
"""Application configuration using pydantic-settings"""
|
||||
|
||||
from typing import Optional
|
||||
from pydantic_settings import BaseSettings
|
||||
from functools import lru_cache
|
||||
|
||||
|
||||
class Settings(BaseSettings):
|
||||
"""Main application settings"""
|
||||
|
||||
# Bot Configuration
|
||||
bot_token: str
|
||||
bot_admin_id: int
|
||||
|
||||
# Database Configuration
|
||||
database_url: str
|
||||
database_echo: bool = False
|
||||
|
||||
# Database Credentials (for Docker)
|
||||
db_password: Optional[str] = None
|
||||
db_user: Optional[str] = None
|
||||
db_name: Optional[str] = None
|
||||
|
||||
# Redis Configuration
|
||||
redis_url: str = "redis://localhost:6379/0"
|
||||
|
||||
# Application Configuration
|
||||
app_debug: bool = False
|
||||
app_env: str = "development"
|
||||
log_level: str = "INFO"
|
||||
|
||||
# API Configuration
|
||||
api_host: str = "0.0.0.0"
|
||||
api_port: int = 8000
|
||||
|
||||
# Timezone
|
||||
tz: str = "Europe/Moscow"
|
||||
|
||||
# Security Configuration
|
||||
jwt_secret_key: str = "your-secret-key-change-in-production"
|
||||
hmac_secret_key: str = "your-hmac-secret-change-in-production"
|
||||
require_hmac_verification: bool = False # Disabled by default in MVP
|
||||
access_token_expire_minutes: int = 15
|
||||
refresh_token_expire_days: int = 30
|
||||
|
||||
# CORS Configuration
|
||||
cors_allowed_origins: list[str] = ["http://localhost:3000", "http://localhost:8081"]
|
||||
cors_allow_credentials: bool = True
|
||||
cors_allow_methods: list[str] = ["GET", "POST", "PUT", "DELETE", "OPTIONS"]
|
||||
cors_allow_headers: list[str] = ["*"]
|
||||
|
||||
# Feature Flags
|
||||
feature_telegram_bot_enabled: bool = True
|
||||
feature_transaction_approval: bool = True
|
||||
feature_event_logging: bool = True
|
||||
|
||||
class Config:
|
||||
env_file = ".env"
|
||||
env_file_encoding = "utf-8"
|
||||
case_sensitive = False
|
||||
|
||||
|
||||
@lru_cache()
|
||||
def get_settings() -> Settings:
|
||||
"""Get cached settings instance"""
|
||||
return Settings()
|
||||
|
||||
|
||||
# Global settings instance for direct imports
|
||||
settings = get_settings()
|
||||
70
.history/app/core/config_20251210211818.py
Normal file
70
.history/app/core/config_20251210211818.py
Normal file
@@ -0,0 +1,70 @@
|
||||
"""Application configuration using pydantic-settings"""
|
||||
|
||||
from typing import Optional
|
||||
from pydantic_settings import BaseSettings
|
||||
from functools import lru_cache
|
||||
|
||||
|
||||
class Settings(BaseSettings):
|
||||
"""Main application settings"""
|
||||
|
||||
# Bot Configuration
|
||||
bot_token: str
|
||||
bot_admin_id: int
|
||||
|
||||
# Database Configuration
|
||||
database_url: str
|
||||
database_echo: bool = False
|
||||
|
||||
# Database Credentials (for Docker)
|
||||
db_password: Optional[str] = None
|
||||
db_user: Optional[str] = None
|
||||
db_name: Optional[str] = None
|
||||
|
||||
# Redis Configuration
|
||||
redis_url: str = "redis://localhost:6379/0"
|
||||
|
||||
# Application Configuration
|
||||
app_debug: bool = False
|
||||
app_env: str = "development"
|
||||
log_level: str = "INFO"
|
||||
|
||||
# API Configuration
|
||||
api_host: str = "0.0.0.0"
|
||||
api_port: int = 8000
|
||||
|
||||
# Timezone
|
||||
tz: str = "Europe/Moscow"
|
||||
|
||||
# Security Configuration
|
||||
jwt_secret_key: str = "your-secret-key-change-in-production"
|
||||
hmac_secret_key: str = "your-hmac-secret-change-in-production"
|
||||
require_hmac_verification: bool = False # Disabled by default in MVP
|
||||
access_token_expire_minutes: int = 15
|
||||
refresh_token_expire_days: int = 30
|
||||
|
||||
# CORS Configuration
|
||||
cors_allowed_origins: list[str] = ["http://localhost:3000", "http://localhost:8081"]
|
||||
cors_allow_credentials: bool = True
|
||||
cors_allow_methods: list[str] = ["GET", "POST", "PUT", "DELETE", "OPTIONS"]
|
||||
cors_allow_headers: list[str] = ["*"]
|
||||
|
||||
# Feature Flags
|
||||
feature_telegram_bot_enabled: bool = True
|
||||
feature_transaction_approval: bool = True
|
||||
feature_event_logging: bool = True
|
||||
|
||||
class Config:
|
||||
env_file = ".env"
|
||||
env_file_encoding = "utf-8"
|
||||
case_sensitive = False
|
||||
|
||||
|
||||
@lru_cache()
|
||||
def get_settings() -> Settings:
|
||||
"""Get cached settings instance"""
|
||||
return Settings()
|
||||
|
||||
|
||||
# Global settings instance for direct imports
|
||||
settings = get_settings()
|
||||
Reference in New Issue
Block a user