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
InitandEvent.DISPENSEfor SKU dispense handling - Payment metadata callbacks (
mop/moe/mos) as raw JSON strings - Optional image upload via
firmngin[http]
Requirements
- Python 3.9+
- A
keys.jsonfile from the Firmngin dashboard
Dependencies
Image upload:
pip install firmngin[http]
Quickstart
Async — for asyncio-based apps:Debug mode
Debug is off by default. Enable it beforeconnect() to print the startup banner and connection logs: