Skip to main content
alpha-sdk-client is the official Python client for the Alpha Camera REST API. It ships both sync (AlphaSDKClient) and async (AsyncAlphaSDKClient) variants and uses httpx for transport.

Install

You also need a running server on localhost:8080. The Python client does not ship a ServerManager class — start the server using the Node-based CLI from the server package, or spawn the binary as a subprocess from Python (recipe).

Initialize

Constructor options

Async variant

The async client mirrors the sync API method-for-method — every call is await-able.

Common operations

List + connect a camera

Read a single property

Read every property at once

Set a property

Trigger the shutter

Pull a single live-view JPEG

For OSD-overlaid frames after client.live_view.enable_osd(camera_id=...):
See the live-view polling recipe for a render loop.

Disconnect


Error handling

Every method raises a typed subclass of ApiError:
Each error exposes status_code, body (parsed dict), and headers. Network failures and timeouts raise httpx.HTTPError subclasses (not ApiError).

Advanced

Custom request options per call

Bring your own httpx.Client

Useful for proxying, retries, or testing:

Pydantic models

Every response body is a Pydantic v2 model — use .model_dump() to serialize, .model_validate() to construct from a dict:

Use in a Jupyter notebook

The sync client works seamlessly in notebooks. For long-running async patterns inside Jupyter, use await at the top level (Jupyter supports it natively):
For a minimal notebook-oriented helper layer, see:

What’s NOT in the client

By design, the following live in recipes rather than the generated SDK:
  • SSE events — use httpx.stream() against /api/events and parse text/event-stream line-by-line.
  • Discovery + reconnect orchestration — copy from the discovery + reconnect recipe.

Versioning

alpha-sdk-client follows SemVer. Every release is documented in the package CHANGELOG, available on PyPI.