Skip to main content

Async Python library for communicating with the GoXLR Utility daemon

Project description

goxlrutil-api

Async Python library for communicating with the GoXLR Utility daemon.

Features

  • Three transports: Unix socket, HTTP, WebSocket
  • Async-first with optional sync wrappers
  • Live state cache: incoming JSON Patch events are applied automatically
  • Typed API: dataclass/enum models for all commands and responses

Installation

pip install goxlrutil-api
# With demo webapp extras:
pip install "goxlrutil-api[webapp]"

Quick start

import asyncio
from goxlrutil_api import GoXLRClient
from goxlrutil_api.transport import UnixSocketTransport

async def main():
    transport = UnixSocketTransport()
    async with GoXLRClient(transport) as client:
        status = await client.get_status()
        for serial, mixer in status.mixers.items():
            print(serial, mixer.hardware.device_type)

asyncio.run(main())

Transports

Class Usage
UnixSocketTransport Local daemon via /tmp/goxlr.socket
HttpTransport HTTP POST /api/command (local or remote)
WebSocketTransport WebSocket /api/websocket – also receives live Patch events

Demo webapp

# With Poetry (development):
poetry install --all-extras
poetry run uvicorn apps.demo_webapp.main:app --reload

# Or with pip:
pip install "goxlrutil-api[webapp]"
uvicorn apps.demo_webapp.main:app --reload

Open http://localhost:8000

By default the webapp connects via WebSocket (ws://localhost:14564/api/websocket), which enables live patch events – including button presses, volume changes, and fader updates.

To force Unix socket instead (no live events, request/response only):

GOXLR_USE_WS=0 poetry run uvicorn apps.demo_webapp.main:app --reload

The app starts even if the GoXLR daemon is not running – it will show a "not connected" status.

Development

poetry install
poetry run pytest
poetry run ruff check src
poetry run pyright

Protocol notes

  • Unix socket uses a 4-byte big-endian length-prefixed JSON frame.
  • HTTP sends the same DaemonRequest JSON to POST /api/command.
  • WebSocket wraps requests in {"id": <uint>, "data": <DaemonRequest>}.
  • State updates from WebSocket are RFC 6902 JSON Patch operations.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

goxlrutil_api-0.0.1.tar.gz (22.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

goxlrutil_api-0.0.1-py3-none-any.whl (28.1 kB view details)

Uploaded Python 3

File details

Details for the file goxlrutil_api-0.0.1.tar.gz.

File metadata

  • Download URL: goxlrutil_api-0.0.1.tar.gz
  • Upload date:
  • Size: 22.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for goxlrutil_api-0.0.1.tar.gz
Algorithm Hash digest
SHA256 fcd58f63b6188dc93f807904ca7f7216358fcae22545b8e7f81b425fc3d43077
MD5 d8dcf0ff529323963c14f4de6a421e09
BLAKE2b-256 eaa581c63eb9fa737ed05967cf7fb75a253dc598d0a93770a8df4f64845367a3

See more details on using hashes here.

Provenance

The following attestation bundles were made for goxlrutil_api-0.0.1.tar.gz:

Publisher: release.yml on ferenyl/goxlrutil_api

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file goxlrutil_api-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: goxlrutil_api-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 28.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for goxlrutil_api-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4ba3406c693748189bac550f388bb7cc97c2c1ccb73a0413c227af28c4f4e43e
MD5 926c9998125ea222f2dbb6c8b62b13f0
BLAKE2b-256 140024c191630d6abc822659842d2868cc363996ccecf4b3fb70f92a324ca43f

See more details on using hashes here.

Provenance

The following attestation bundles were made for goxlrutil_api-0.0.1-py3-none-any.whl:

Publisher: release.yml on ferenyl/goxlrutil_api

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page