
- Add ServerSettings class with pydantic-settings for type-safe configuration - Support multiple PyPI mirror sources with priority-based fallback mechanism - Implement RepositoryConfig and RepositoryManager for multi-repository support - Add environment variable support for all configuration options - Include private repository authentication configuration - Add advanced dependency analysis settings (max depth, concurrency, security) - Provide secure credential management with sensitive data masking - Update documentation and configuration examples - Add comprehensive test suite with 23 test cases covering all features - Include demo script showcasing multi-mirror configuration capabilities Configuration features: - Primary, additional, and fallback index URLs - Automatic duplicate URL removal with priority preservation - Runtime configuration reloading - Integration with repository manager for seamless multi-source queries Signed-off-by: longhao <hal.long@outlook.com>
36 lines
746 B
Python
36 lines
746 B
Python
"""Configuration management for PyPI Query MCP Server.
|
|
|
|
This package handles configuration loading, validation, and management
|
|
for the MCP server, including private registry settings.
|
|
"""
|
|
|
|
from .repository import (
|
|
AuthType,
|
|
RepositoryConfig,
|
|
RepositoryManager,
|
|
RepositoryType,
|
|
get_repository_manager,
|
|
reload_repository_manager,
|
|
)
|
|
from .settings import (
|
|
ServerSettings,
|
|
get_settings,
|
|
reload_settings,
|
|
update_settings,
|
|
)
|
|
|
|
__all__ = [
|
|
# Settings
|
|
"ServerSettings",
|
|
"get_settings",
|
|
"reload_settings",
|
|
"update_settings",
|
|
# Repository
|
|
"RepositoryConfig",
|
|
"RepositoryManager",
|
|
"RepositoryType",
|
|
"AuthType",
|
|
"get_repository_manager",
|
|
"reload_repository_manager",
|
|
]
|