Minimal Python example repo for Jupyter notebooks and simple data-collection workflows.
This repo is not the Python SDK package itself. Install the published client from PyPI:
pip install alpha-sdk-clientUse this repo as copy-paste/reference code for:
- discovering and connecting to a camera
- collecting repeated property snapshots into row dictionaries
- triggering AF + shutter capture
- enabling live view and fetching a JPEG frame
- previewing SD card files in
remote-transfermode
- Python 3.8+
- a running Alpha Camera server on
http://localhost:8080 - a camera supported by the SDK
Start the camera server separately. For example:
npm install -g @alpha-sdk/api
camera-server startpip install -r requirements.txtIf you do not want Jupyter installed, the only required runtime dependency is:
pip install alpha-sdk-clientnotebook_data_collection.py— notebook-friendly helper functions plus a small CLI smoke test
From the repo root:
python notebook_data_collection.pyThat will:
- discover cameras
- connect to the first one
- collect a few property snapshots
- print the results
To trigger one real capture:
python notebook_data_collection.py --captureStart Jupyter from this repo root:
jupyter notebookThen in a notebook cell:
from alpha_sdk_client import AlphaSDKClient
from notebook_data_collection import (
collect_property_rows,
connect_first_camera,
enable_live_view,
fetch_live_view_frame,
save_live_view_frame,
)
client = AlphaSDKClient(base_url="http://localhost:8080")
camera = connect_first_camera(client, mode="remote")
rows = collect_property_rows(client, camera.id, count=5, interval_s=1.0)If you want a DataFrame:
import pandas as pd
df = pd.DataFrame(rows)
df.head()enable_live_view(client, camera.id)
frame = fetch_live_view_frame(client, camera.id)
save_live_view_frame(frame, "frame.jpg")mode="remote"is the simplest default for control and capture.- Use
mode="remote-transfer"if you also want SD card listing/downloads. - The helper waits for connection status after
connect()rather than assuming the server flips to connected immediately.