2. pybt.core.config
Configuration module for the BaoTa Panel SDK.
This module contains all the configuration settings, API endpoints, and constants used throughout the SDK.
- class pybt.core.config.Config(endpoints: ~typing.Dict[str, str] = <factory>, api_key: str | None = None, bt_panel_host: str = None, debug: bool = False, timeout: int = 30, verify_ssl: bool = True)
Configuration class for BaoTa Panel SDK.
This class holds all configuration settings including API endpoints, authentication details, and other runtime settings.
- __init__(endpoints: ~typing.Dict[str, str] = <factory>, api_key: str | None = None, bt_panel_host: str = None, debug: bool = False, timeout: int = 30, verify_ssl: bool = True) None
- api_key: str | None = None
- bt_panel_host: str = None
- debug: bool = False
- endpoints: Dict[str, str]
- get_endpoint(name: str) str
Get API endpoint by name.
- Parameters:
name – Name of the endpoint
- Returns:
Full API endpoint URL
- Raises:
KeyError – If endpoint name is not found
- timeout: int = 30
- verify_ssl: bool = True