Edge SDK (Python) — Configuration

The Python Edge SDK is configured exclusively via environment variables, centralized in EdgeAdapterConfig. Call EdgeAdapterConfig.from_env() to build one, then .runtime() to get a connected EdgeAdapterRuntime — see the Quickstart.

For Java/Quarkus configuration see edge-sdk-configuration.md.


EdgeAdapterConfig environment variables

VariableDescriptionDefault
GRPC_HOSTBind address for this adapter's own gRPC server0.0.0.0
GRPC_PORTBind port for this adapter's own gRPC server50051
CONNECTOR_HOSTConnector service hostnamelocalhost
CONNECTOR_PORTConnector service gRPC port50053
TELEMETRY_HOSTLive Data service hostnamelocalhost
TELEMETRY_PORTLive Data service gRPC port50052
MISSION_AUTONOMY_HOSTMission Autonomy service hostnamelocalhost
MISSION_AUTONOMY_PORTMission Autonomy service gRPC port50054
ADAPTER_SNSerial number this adapter logs under; each telemetry frame also carries its own asset SN, so this doesn't need to match for multi-asset adapters""
LOG_LEVELPython log level nameINFO
LOG_FORMATjson or textjson

Credentials and pairing

VariableDescriptionDefault
ZQNT_EDGE_TOKENThe adapter's edge credential, sent on every call to the platform. Issued in the Admin Console under Manage → Access & Integrations → Credentials (kind Edge adapter). Without it the platform refuses the callsunset
ZQNT_PLATFORM_PUBLIC_KEYThe platform's public key (alias SERVICE_AUTH_PUBLIC_KEY). The adapter's server refuses every call the platform did not sign with it; without it, every call is refusedunset
ZQNT_EDGE_AUTH_DISABLEDtrue turns that check off — for a local simulator stack onlyfalse
ZQNT_CLAIM_CODEOne-time pairing code, redeemed by ensure_asset for an asset the platform doesn't know yetunset

The library's built-in port defaults do not match the platform's real service ports. Always set CONNECTOR_PORT=8010, TELEMETRY_PORT=8003, and MISSION_AUTONOMY_PORT=8004 (or your deployment's actual ports) explicitly — don't rely on the defaults above.

from edge_sdk import EdgeAdapterConfig

config = EdgeAdapterConfig.from_env()
async with config.runtime() as runtime:
    ...

For tests or explicit configuration, construct EdgeAdapterConfig(...) directly instead of calling from_env() — every field has a keyword-argument equivalent.


Optional: automatic Redis service-discovery registration

If set, the SDK registers this adapter's endpoint in Redis on startup (online=True) and marks it offline on shutdown, so the platform's client-side load balancer can discover it dynamically.

VariableDescriptionDefault
EDGE_ENDPOINTgRPC endpoint advertised to the platform, e.g. grpc://my-adapter.internal:9001unset (registration off)
ASSET_TYPEProto-style asset type name, e.g. ASSET_TYPE_AIRCRAFTunset
ASSET_VENDORProto-style vendor name, e.g. ASSET_VENDOR_MAVLINKunset
REDIS_URLRedis connection URLredis://localhost:6379

Registration only activates when EDGE_ENDPOINT, ASSET_TYPE, and ASSET_VENDOR are all set — EdgeAdapterConfig.runtime()'s serve() builds the RegistrationConfig for you automatically in that case. To configure it directly:

from edge_sdk import RegistrationConfig

registration = RegistrationConfig.from_env()  # reads EDGE_ENDPOINT / ASSET_TYPE / ASSET_VENDOR / REDIS_URL

Redis key format: zqnt:edge-endpoints:{VENDOR} — the same key the platform and the Java and Go SDKs use in 2.0.


Logging

EdgeAdapterRuntime calls logging.basicConfig(...) for you based on LOG_LEVEL/LOG_FORMAT — you don't need to configure it yourself unless you want something different. LOG_FORMAT=json uses python-json-logger if installed, falling back to plain text otherwise.

import logging
logging.getLogger("edge_sdk").setLevel(logging.DEBUG)

TLS / authentication

Authentication is built in, in both directions — see Credentials and pairing.

TLS is not supported. The SDK's clients always open plaintext gRPC channels to the platform. If your deployment requires TLS between the adapter and the platform, terminate it at a sidecar/proxy in front of the platform services instead.


Putting it together

import asyncio
from edge_sdk import EdgeAdapterConfig

from .adapter import MyDeviceAdapter

async def main():
    config = EdgeAdapterConfig.from_env()
    async with config.runtime() as runtime:
        adapter = MyDeviceAdapter()
        await runtime.serve(adapter)

asyncio.run(main())

Was this page helpful?

© Copyright 2026 Zequent. All rights reserved.