Skip to main content
Use the Firmngin Python SDK on Raspberry Pi, Linux-based devices, integration tests, and server-side tooling.

Client vs AsyncClient

Two entry points, one protocol — choose what fits your code: Both use ClientConfig.from_file("keys.json") and support the same events.

Features

  • TLS, mTLS, and certificate validation (including dashboard keys.json)
  • E2EE (AES-GCM) enabled by default
  • LWT online/offline on connect and disconnect
  • Auto request_init() on connect
  • Typed events, entity publishing, batch updates, location, offline queue
  • Vending mode helpers on Init and Event.DISPENSE for SKU dispense handling
  • Payment metadata callbacks (mop / moe / mos) as raw JSON strings
  • Optional image upload via firmngin[http]
OTA firmware updates are not available in the Python SDK.

Requirements

  • Python 3.9+
  • A keys.json file from the Firmngin dashboard

Dependencies

Image upload: pip install firmngin[http]

Quickstart

Async — for asyncio-based apps:
Sync — for scripts without asyncio:

Debug mode

Debug is off by default. Enable it before connect() to print the startup banner and connection logs:

See also