Skip to content

v1.3.8 — Device management SDK + CLI

Latest

Choose a tag to compare

@rvirani1 rvirani1 released this 06 May 14:20
· 17 commits to main since this release
cffc59f

Device Management — SDK + CLI

Adds Python SDK and CLI bindings for the external Deployments / Device Management API (shipped in #469). 1:1 with the documented public routes. PATCH /config, stream commands, device delete, and fleet-groups CRUD are intentionally out of scope.

SDK

  • Workspace.devices() — list all devices in the workspace.
  • Workspace.device(id) — fetch a single device by id.
  • Workspace.create_device(...) — register a new device.
  • Device — handle exposing config(), config_history(), streams(), stream(id), logs(...), telemetry(...), events(...), refresh().
import roboflow
rf = roboflow.Roboflow(api_key="...")
ws = rf.workspace()

for d in ws.devices():
    print(d.id, d.name, d.status)

device = ws.device("dev_abc123")
print(device.telemetry(time_period="1h"))

Device.config() may include environment_variables and integration credentials. Treat the returned payload as sensitive; the CLI prints a stderr advisory in interactive mode.

CLI

roboflow device list                                    [--json]
roboflow device get <id>                                [--json]
roboflow device create --name <name> ...                [--json]
roboflow device config <id>                             [--json]
roboflow device config-history <id>                     [--json]
roboflow device streams <id>                            [--json]
roboflow device stream <id> <stream-id>                 [--json]
roboflow device logs <id> [--service ...] [--severity ...] [--json]
roboflow device telemetry <id> [--time-period 1h]       [--json]
roboflow device events <id> [--entity-type stream]      [--json]

Every command supports --json for structured output and emits actionable hints with stable exit codes (0 success, 1 error, 2 auth, 3 not-found). Rate-limited responses (429) include backoff hints.

Low-level (roboflow.adapters.devicesapi)

New typed exceptions: DeviceBadRequestError (400), DeviceAuthError (401/403), DeviceNotFoundError (404), DeviceRateLimitedError (429), DeviceApiError (5xx). HTTP layer covers all 10 documented routes.

Other changes

  • Device API request timeouts — all device-management HTTP calls now carry an explicit timeout.

Backward compatibility

Purely additive. The new endpoints require the following scopes:

Action Required scope
device list / device get / device config / device config-history / device streams / device stream / device logs / device telemetry / device events device:read
device create device:update

Full diff: v1.3.7...v1.3.8