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.

Documentation

  • Wiki — full API reference, examples, and integration guide
  • USAGE.md — single-file version of the same documentation

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.2.tar.gz (29.3 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.2-py3-none-any.whl (34.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: goxlrutil_api-0.0.2.tar.gz
  • Upload date:
  • Size: 29.3 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.2.tar.gz
Algorithm Hash digest
SHA256 e67fb1f33d517c6e396d536181d0dd97936290da6bfb582e606eef43cc6ec923
MD5 91c4e0cd16c38e29c3df54083204a104
BLAKE2b-256 51231d02fe2d155d4aa31b2dc8920f269c2ca6f10549232e9ffd09a1ee746df2

See more details on using hashes here.

Provenance

The following attestation bundles were made for goxlrutil_api-0.0.2.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.2-py3-none-any.whl.

File metadata

  • Download URL: goxlrutil_api-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 34.8 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5b1ff718f80f92bf3f713c7b7945353e7984b8f6eb4c8f6eb38dafe060f25eca
MD5 8fa5448a3d0d6c7cc8f6cde88173b8dc
BLAKE2b-256 85832b1a16c0d4fc5ff63661079c3517a5d0526a8156bac1792cad4ec8762b55

See more details on using hashes here.

Provenance

The following attestation bundles were made for goxlrutil_api-0.0.2-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