Skip to content

AccordionQ2 Python Client

Python client library for the AccordionQ2 Hardware Management REST API.

PyPI NuGet (.NET)

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 with blocks 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

Reference

  • Models — request/response model classes
  • Enums — enumeration types

Error Handling

Additional Topics

Also Available

Platform Package
Python 3.11+ accordionq2 via pip
.NET Standard 2.0+ AccordionQ2.WebApiClient via NuGet