- Overview
- ECNConfig
ECNConfig
Part of Configuration & authentication in the Python API reference.
Related guidance: getting-started/configuration, getting-started/authentication, security/credentials.
Runnable examples: preflight.py.
from picogrid_ecn_client import ECNConfigConfigure one immutable SDK MQTT v5 connection.
ECNConfig( *, host: str, integration_name: str, terminal_id: UUID | None = None, mqtt_port: int, ntp_host: str | None = None, ntp_port: int = 123, auth: BearerTokenAuth | MTLSAuth | NoAuth, tls: TLSConfig = TLSConfig(), wire_format: WireFormat = WireFormat.JSON, connection_timeout: float = 10.0, operation_timeout: float = 30.0, task_timeout: float = 10.0, shutdown_timeout: float = 5.0, reconnect_policy: ReconnectPolicy = ReconnectPolicy(), watcher_buffer_size: int = 256, maximum_payload_size: int = 1048576, maximum_outstanding_operations: int = 128, allow_insecure: bool = False, plaintext_container_network: ReviewedContainerNetwork | None = None,)Fields
Section titled “Fields”| Name | Type | Required | Default | Constraints | Description |
|---|---|---|---|---|---|
| host | str | yes | — | min_length=1, max_length=1024 | DNS name or IP literal without scheme, port, credentials, whitespace, or path, from 1 through 1024 characters. |
| integration_name | str | yes | — | min_length=2, max_length=128, pattern='^[A-Za-z0-9][A-Za-z0-9_-]{0,126}[A-Za-z0-9]$' | Integration name of 2 through 128 allowed ASCII characters; starts and ends alphanumeric; ‘geolocation’ and ‘response’ are reserved case-insensitively. |
| terminal_id | UUID | None | no | None | — | Optional canonical connected-terminal UUID used for task source and addressed response routing. |
| mqtt_port | int | yes | — | ge=1, le=65535 | Explicit MQTT port, from 1 through 65,535. |
| ntp_host | str | None | no | None | min_length=1, max_length=1024 | Optional NTP host for the ECN-relative clock diagnostic, from 1 through 1024 characters. When unset the diagnostic measures host, so set this only for a separately provided endpoint. |
| ntp_port | int | no | 123 | ge=1, le=65535 | NTP port used by the clock diagnostic, from 1 through 65,535. |
| auth | BearerTokenAuth | MTLSAuth | NoAuth | yes | — | — | Bearer-token, mutual-TLS, or no-authentication configuration. |
| tls | TLSConfig | no | TLSConfig() | — | TLS settings; defaults to enabled peer-verified TLS. |
| wire_format | WireFormat | no | WireFormat.JSON | — | Entity and location payload encoding; defaults to JSON over MQTT v5. |
| connection_timeout | float | no | 10.0 | gt=0, le=120 | Connect-stage timeout in seconds, greater than 0 through 120. |
| operation_timeout | float | no | 30.0 | gt=0, le=300 | General operation and observed-update timeout in seconds, greater than 0 through 300. |
| task_timeout | float | no | 10.0 | gt=0, le=3600 | Default task response timeout in seconds, greater than 0 through 3,600. |
| shutdown_timeout | float | no | 5.0 | gt=0, le=60 | Whole-client cleanup timeout in seconds, greater than 0 through 60. |
| reconnect_policy | ReconnectPolicy | no | ReconnectPolicy() | — | Typed exponential reconnect, jitter, stable-reset, and retry-budget policy. |
| watcher_buffer_size | int | no | 256 | ge=1, le=100000 | Maximum buffered events per watcher, from 1 through 100,000. |
| maximum_payload_size | int | no | 1048576 | ge=1024, le=16777216 | Maximum accepted or emitted payload in bytes, from 1,024 through 16,777,216 bytes. |
| maximum_outstanding_operations | int | no | 128 | ge=1, le=10000 | Maximum correlated task operations, from 1 through 10,000. |
| allow_insecure | bool | no | False | — | Whether plaintext or unverified TLS is permitted for loopback mock endpoints; defaults to false. |
| plaintext_container_network | ReviewedContainerNetwork | None | no | None | — | Explicit attestation that plaintext MQTT is confined to one reviewed container network; requires TLS to be disabled and authentication kind to be ‘none’; defaults to null. |
Version 0.2.0 · branch main
