Skip to main content

nexalware

Typed client for the Nexalware API, control physical devices and read their telemetry from any Python agent or app. Zero third-party dependencies, built on urllib from the standard library, so dropping it into any existing agent environment can never trigger a version conflict.

Writing in TypeScript instead? See @nexalware/sdk on npm. Want an MCP-aware host to discover these as tools automatically instead of calling them from code? See @nexalware/mcp.

Install

pip install nexalware

Quickstart

from nexalware import NexalwareClient

client = NexalwareClient(api_key="nxw_live_sk_your_key_here")

client.turn_on("dev_a1b2c3")

latest = client.get_latest_telemetry("dev_a1b2c3")
print(latest["state"], latest["telemetry"])

Get an API key from the dashboard (API Keys), and make sure it has a DeviceGrant covering the device(s) and command(s) you call, an ungranted key authenticates fine but every call is rejected with a 403.

Field names match the API's own JSON, not snake_case. Return values are plain dicts (typed as TypedDict for editor/type-checker support), with the same field names the REST API itself uses, e.g. latest["subDeviceId"], not latest["sub_device_id"]. Method and argument names are proper Python snake_case, only the data payloads keep the wire format.

NexalwareClient(api_key, base_url=...)

Param Type Required Meaning
api_key str yes A secret key from the dashboard.
base_url str no Override for a self-hosted or staging deployment. Defaults to https://api.nexalware.com.
timeout float no Abort a request after this many seconds. Defaults to 30.0.

Errors

Every method raises NexalwareApiError on a non-2xx response, it never returns a "silent" error value.

Attribute Type Meaning
status int HTTP status code.
error str Short machine-readable code, e.g. "FORBIDDEN", "NOT_FOUND".
message str | None Human-readable reason, same text a dashboard user would see.
details list | None Only present on a 400 validation failure.
from nexalware import NexalwareApiError

try:
    client.send_command("dev_a1b2c3", "SET_BRIGHTNESS", params={"level": 60})
except NexalwareApiError as err:
    print(err.status, err.error, err.message)

Methods

  • list_devices(project_id=None) - the devices this key can actually act on, only what its own DeviceGrant(s) cover. Call this first to discover valid device_id values instead of needing them hardcoded or pasted in.
  • get_commands(device_id) - the command catalog this device accepts.
  • send_command(device_id, cmd, params=None, target=None) - send a command to a device, or, with target set, to one specific sub-device behind it.
  • turn_on(device_id) / turn_off(device_id) - shorthand for send_command(device_id, "ON" | "OFF").
  • get_telemetry(device_id, metric=None, limit=None, since=None) - historical telemetry readings, newest first.
  • get_latest_telemetry(device_id) - current state snapshot plus the most recent reading per metric.
  • list_sub_devices(device_id) / get_sub_device(device_id, sub_device_id) - physical devices connected locally behind a master device.
  • get_sub_device_telemetry(device_id, sub_device_id, metric=None, limit=None, since=None) - same shape as get_telemetry, scoped to one sub-device.
  • send_sub_device_command(device_id, sub_device_id, cmd, params=None) - convenience wrapper over send_command with target already set.
  • list_schedules(device_id) / get_schedule_context(device_id) - a device's active schedules, and the commands available to schedule.
  • create_schedule(device_id, slot, on_ts, off_ts, ...) / update_schedule(...) / delete_schedule(device_id, slot) - manage a device's schedule slots (0-4).
  • get_schedule_history(device_id) - a device's completed or cancelled schedules, most recent first.

Full parameter/return types for every method: SDK Reference.

License

MIT

Release files for nexalware 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nexalware 0.1.0
File Size Uploaded
nexalware-0.1.0.tar.gz 10.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for nexalware 0.1.0
File Interpreter ABI Platform
nexalware-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 19.8 kB

Release files / nexalware-0.1.0.tar.gz

Download URL nexalware-0.1.0.tar.gz
Size 10.2 kB
Tags Source
SHA-256 checksum
How to use checksums
a17079f095a28a3e751cb6aad203834bb046336aca66562469431a801a004c34
BLAKE2b-256 checksum
How to use checksums
c444609156c8b4846d07ddf2de87cb09cf4b3d9f2ce6eb211989dbc9eaed924f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.6

Release files / nexalware-0.1.0-py3-none-any.whl

Download URL nexalware-0.1.0-py3-none-any.whl
Size 9.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9e80d68ab155e66c4457f73361c7f4b6225169c8fb2c8682ba413a09cb01952d
BLAKE2b-256 checksum
How to use checksums
0fa08774c3e626b9b4c7fe7a36254fa95556241a169a0be54b41cb07df19368c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.6

Release history Release notifications | RSS feed

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page