AccordionQ2 Python Client¶
Python client library for the AccordionQ2 Hardware Management REST API.
This is the Python counterpart of the .NET WebApiClient. Both libraries expose the same API surface so switching between them feels natural.
Features¶
- Zero dependencies — uses only the Python standard library (
http.client,json,ssl,threading,dataclasses) - Full API coverage — 8 operation groups covering all hardware management endpoints
- Synchronous & thread-safe — simple blocking calls, safe from multiple threads
- Context manager support — use with
withblocks for clean resource management - Cross-platform — Windows, Linux (including ARM / Raspberry Pi), macOS
- Fully typed — complete PEP 484 type annotations, compatible with mypy strict mode
- Immutable models — all response DTOs are frozen dataclasses
Quick Example¶
from accordionq2 import AccordionQ2Client
with AccordionQ2Client("http://agent64.local:5000") as client:
status = client.connection.get_status()
print("Connected:", status.is_connected)
temp = client.resources.get_value("TempRegulator.CPU_TEMP")
print("CPU temperature:", temp)
Getting Started¶
API Reference¶
- Overview — all 8 API groups at a glance
- Resources, Channels, Modules, Application, Media, Connection
- Calibration — calibration operations
- Comm (Bus Transactions) — I2C, UART, SPI, Socket
- Numeric Results — high-speed sampling
Reference¶
Error Handling¶
- Error Handling — exceptions and error patterns
Additional Topics¶
- .NET Comparison — differences from the .NET client
- Testing — testing strategies and examples
Also Available¶
| Platform | Package |
|---|---|
| Python 3.11+ | accordionq2 via pip |
| .NET Standard 2.0+ | AccordionQ2.WebApiClient via NuGet |