Python client library for the Wisent Wire hardware testing platform API
Project description
Wisent Wire Python SDK
Python client library for the WisentWire hardware testing platform.
Installation
pip install wisent-wire-sdk
Quick start
from wisentwire import WisentWireClient
# API key (recommended — scripts, CI, MCP)
client = WisentWireClient(
base_url="https://int.wisent-wire.com",
api_key="wwk_...", # or set WISENTWIRE_API_KEY env var
)
# Cognito (email + password)
client = WisentWireClient(
base_url="https://int.wisent-wire.com",
email="user@company.com",
password="secret",
)
# Pre-existing bearer token
client = WisentWireClient(
base_url="https://int.wisent-wire.com",
token="eyJhbGciOi...",
)
Create an API key from the web app under Settings → API keys. Keys are shown once — store securely. Default expiry is 1 year; max 10 active keys per user.
Usage
WisentWires
wws = client.list_wisentwires()
ww = client.get_wisentwire(ww_id=1)
Power supply
client.set_power_supply(ww_id=1, state="ON", voltage=5.0, current=2.0)
shadow = client.wait_shadow_state(ww_id=1, expected_state="ON")
print(shadow.reported.voltage_setpoint)
Firmware & flash
fw = client.upload_firmware("app.bin", firmware_bytes, "STM32F4")
job_id = client.flash(ww_id=1, firmware_id=fw.id)
client.wait_flash_complete(ww_id=1, job_id=job_id)
UART
client.send_uart_ascii(ww_id=1, text="HELLO")
msg = client.wait_for_uart_rx(ww_id=1, match_hex="48454C4C4F")
print(msg.bytes_hex)
Telemetry
readings = client.get_power_telemetry(ww_id=1)
Reservations
reservations = client.list_reservations()
Organization
org = client.get_organization()
members = client.list_members()
Error handling
All API errors raise typed exceptions inheriting from WisentWireError:
from wisentwire import NotFoundError, ConflictError
try:
client.get_wisentwire(ww_id=999)
except NotFoundError as e:
print(f"WisentWire not found: {e}")
| HTTP status | Exception |
|---|---|
| 400 | BadRequestError |
| 401 | AuthenticationError |
| 403 | ForbiddenError |
| 404 | NotFoundError |
| 409 | ConflictError |
| 429 | RateLimitError |
| 503 | ServiceUnavailableError |
Development
pip install -e ".[dev]"
pytest tests/ -v
Requirements
- Python >= 3.10
requests>= 2.28tenacity>= 8.0
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file wisent_wire_sdk-0.4.0.tar.gz.
File metadata
- Download URL: wisent_wire_sdk-0.4.0.tar.gz
- Upload date:
- Size: 36.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f4f255c8beac125d6b9dac0158891bd8fd8a098811bf796c29413230ef61d23c
|
|
| MD5 |
cf04422028d3b26a971fdf72a08a1820
|
|
| BLAKE2b-256 |
b405041b80dbd4243fbf85a2938ae3f65fe17f182b83c77e6ff21e66fcae4927
|
File details
Details for the file wisent_wire_sdk-0.4.0-py3-none-any.whl.
File metadata
- Download URL: wisent_wire_sdk-0.4.0-py3-none-any.whl
- Upload date:
- Size: 42.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aca789be4ff1418fcc9ec91d4039fd85431bebaa990806b007b16269c1ee3607
|
|
| MD5 |
b15c1a0cf887d8fdee0350447f32b3c0
|
|
| BLAKE2b-256 |
66bad4e277cd4187e8a02c126db8be037d8b81dce31c5ebdddcb3c275c5a3985
|