For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Log inSign up
Support
GuidesReference
GuidesReference
    • Core
      • Overview
    • Agents
      • Overview
      • AgentBase
      • AgentServer
      • BedrockAgent
      • CLI Tools
      • Configuration
        • AuthHandler
        • ConfigLoader
          • find_config_file
          • get
          • get_config
          • get_config_file
          • get_section
          • has_config
          • merge_with_env
          • substitute_vars
        • Environment Variables
        • SecurityConfig
      • ContextBuilder
      • DataMap
      • FunctionResult
      • Helper Functions
      • LiveWire
      • MCP Gateway
      • PomBuilder
      • Prefabs
      • Search
      • SkillBase
      • Skills
      • SWAIGFunction
      • SWMLBuilder
      • SWMLService
      • WebService
    • RELAY
      • Overview
      • Actions
      • Call
      • Constants
      • Events
      • Message
      • RelayClient
      • RelayError
    • REST Client
      • Overview
      • Addresses
      • Calling
      • Chat
      • Compat
      • Datasphere
      • Fabric
      • Imported Numbers
      • Logs
      • Lookup
      • MFA
      • Number Groups
      • Phone Numbers
      • Project
      • PubSub
      • Queues
      • Recordings
      • Registry
      • RestClient
      • Short Codes
      • SignalWireRestError
      • SIP Profile
      • Verified Callers
      • Video
LogoLogoSignalWire Docs
Log inSign up
Support
On this page
  • Properties
  • Methods
  • Example
AgentsConfiguration

ConfigLoader

|View as Markdown|Open in Claude|
Was this page helpful?
Edit this page
Previous

find_config_file

Next
Built with

ConfigLoader loads JSON configuration files and substitutes environment variables using ${VAR|default} syntax. It is used internally by SecurityConfig and the mcp-gateway service, and can be used directly for custom configuration needs.

1from signalwire.core.config_loader import ConfigLoader

Properties

config_paths
list[str]

List of file paths checked during initialization. The first existing file is loaded.

Methods

find_config_file

Static method to locate a config file without loading it.

get

Get a configuration value by dot-notation path.

get_config

Get the raw configuration dictionary before environment variable substitution.

get_config_file

Get the path of the loaded config file.

get_section

Get an entire configuration section with environment variables substituted.

has_config

Check whether a configuration file was successfully loaded.

merge_with_env

Merge configuration with environment variables matching a prefix.

substitute_vars

Recursively substitute environment variables in configuration values.

Example

1from signalwire.core.config_loader import ConfigLoader
2
3# Auto-discover config file
4loader = ConfigLoader()
5print(f"Config loaded: {loader.has_config()}")
6
7# Explicit config file path
8loader = ConfigLoader(["./my-config.json", "/etc/myapp/config.json"])
9print(f"Config file: {loader.get_config_file()}")