generated from personal-projects/leo-claude-mktplace
Implement configuration loader module
This commit implements a robust configuration loader using Pydantic Settings that handles: Features: - Environment variable loading with .env file support - Type validation and field constraints - Gitea configuration (URL, token, owner, repo) - HTTP server configuration (host, port) - Optional HTTP authentication token - Optional tool filtering (enabled/disabled tool lists) Implementation: - GiteaSettings class with Pydantic validation - URL validation ensuring http:// or https:// prefix - Helper properties for parsing comma-separated tool lists - get_gitea_mcp_env() method to pass config to wrapped MCP server - load_settings() factory function with optional env_file path Documentation: - .env.example template with all configuration options - Comprehensive docstrings and type hints This module unblocks both the tool filtering (#12) and HTTP authentication middleware (#13) implementations. Closes #11 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
"""Configuration loader module."""
|
||||
|
||||
__all__ = []
|
||||
from .settings import GiteaSettings, load_settings
|
||||
|
||||
__all__ = ["GiteaSettings", "load_settings"]
|
||||
|
||||
Reference in New Issue
Block a user