get_section

View as MarkdownOpen in Claude

Get an entire configuration section with all environment variables substituted.

Parameters

section
strRequired

The top-level section name (e.g., "security", "server", "session").

Returns

dict[str, Any] — The section contents with all variables substituted, or an empty dict if the section does not exist.

Example

1from signalwire.core.config_loader import ConfigLoader
2
3loader = ConfigLoader(["config.json"])
4security = loader.get_section("security")
5
6print(security)
7# {"ssl_enabled": True, "cors_origins": ["https://app.example.com"], ...}