plexus-agent 0.7.0__tar.gz → 0.7.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {plexus_agent-0.7.0 → plexus_agent-0.7.2}/PKG-INFO +5 -5
- {plexus_agent-0.7.0 → plexus_agent-0.7.2}/README.md +4 -4
- {plexus_agent-0.7.0 → plexus_agent-0.7.2}/plexus/__init__.py +1 -1
- plexus_agent-0.7.2/plexus/__main__.py +4 -0
- {plexus_agent-0.7.0 → plexus_agent-0.7.2}/plexus/cli.py +46 -7
- {plexus_agent-0.7.0 → plexus_agent-0.7.2}/pyproject.toml +1 -1
- {plexus_agent-0.7.0 → plexus_agent-0.7.2}/.github/workflows/ci.yml +0 -0
- {plexus_agent-0.7.0 → plexus_agent-0.7.2}/.github/workflows/publish.yml +0 -0
- {plexus_agent-0.7.0 → plexus_agent-0.7.2}/.gitignore +0 -0
- {plexus_agent-0.7.0 → plexus_agent-0.7.2}/API.md +0 -0
- {plexus_agent-0.7.0 → plexus_agent-0.7.2}/LICENSE +0 -0
- {plexus_agent-0.7.0 → plexus_agent-0.7.2}/examples/can_basic.py +0 -0
- {plexus_agent-0.7.0 → plexus_agent-0.7.2}/examples/demo_field_unit.py +0 -0
- {plexus_agent-0.7.0 → plexus_agent-0.7.2}/examples/demo_ground_station.py +0 -0
- {plexus_agent-0.7.0 → plexus_agent-0.7.2}/examples/gateway_ble_relay.py +0 -0
- {plexus_agent-0.7.0 → plexus_agent-0.7.2}/examples/mavlink_basic.py +0 -0
- {plexus_agent-0.7.0 → plexus_agent-0.7.2}/plexus/adapters/__init__.py +0 -0
- {plexus_agent-0.7.0 → plexus_agent-0.7.2}/plexus/adapters/base.py +0 -0
- {plexus_agent-0.7.0 → plexus_agent-0.7.2}/plexus/adapters/ble.py +0 -0
- {plexus_agent-0.7.0 → plexus_agent-0.7.2}/plexus/adapters/can.py +0 -0
- {plexus_agent-0.7.0 → plexus_agent-0.7.2}/plexus/adapters/can_detect.py +0 -0
- {plexus_agent-0.7.0 → plexus_agent-0.7.2}/plexus/adapters/mavlink.py +0 -0
- {plexus_agent-0.7.0 → plexus_agent-0.7.2}/plexus/adapters/mavlink_detect.py +0 -0
- {plexus_agent-0.7.0 → plexus_agent-0.7.2}/plexus/adapters/modbus.py +0 -0
- {plexus_agent-0.7.0 → plexus_agent-0.7.2}/plexus/adapters/mqtt.py +0 -0
- {plexus_agent-0.7.0 → plexus_agent-0.7.2}/plexus/adapters/opcua.py +0 -0
- {plexus_agent-0.7.0 → plexus_agent-0.7.2}/plexus/adapters/registry.py +0 -0
- {plexus_agent-0.7.0 → plexus_agent-0.7.2}/plexus/adapters/serial_adapter.py +0 -0
- {plexus_agent-0.7.0 → plexus_agent-0.7.2}/plexus/buffer.py +0 -0
- {plexus_agent-0.7.0 → plexus_agent-0.7.2}/plexus/cameras/__init__.py +0 -0
- {plexus_agent-0.7.0 → plexus_agent-0.7.2}/plexus/cameras/auto.py +0 -0
- {plexus_agent-0.7.0 → plexus_agent-0.7.2}/plexus/cameras/base.py +0 -0
- {plexus_agent-0.7.0 → plexus_agent-0.7.2}/plexus/cameras/picamera.py +0 -0
- {plexus_agent-0.7.0 → plexus_agent-0.7.2}/plexus/cameras/usb.py +0 -0
- {plexus_agent-0.7.0 → plexus_agent-0.7.2}/plexus/client.py +0 -0
- {plexus_agent-0.7.0 → plexus_agent-0.7.2}/plexus/commands.py +0 -0
- {plexus_agent-0.7.0 → plexus_agent-0.7.2}/plexus/config.py +0 -0
- {plexus_agent-0.7.0 → plexus_agent-0.7.2}/plexus/connector.py +0 -0
- {plexus_agent-0.7.0 → plexus_agent-0.7.2}/plexus/deps.py +0 -0
- {plexus_agent-0.7.0 → plexus_agent-0.7.2}/plexus/detect.py +0 -0
- {plexus_agent-0.7.0 → plexus_agent-0.7.2}/plexus/importers/__init__.py +0 -0
- {plexus_agent-0.7.0 → plexus_agent-0.7.2}/plexus/importers/rosbag.py +0 -0
- {plexus_agent-0.7.0 → plexus_agent-0.7.2}/plexus/sensors/__init__.py +0 -0
- {plexus_agent-0.7.0 → plexus_agent-0.7.2}/plexus/sensors/ads1115.py +0 -0
- {plexus_agent-0.7.0 → plexus_agent-0.7.2}/plexus/sensors/auto.py +0 -0
- {plexus_agent-0.7.0 → plexus_agent-0.7.2}/plexus/sensors/base.py +0 -0
- {plexus_agent-0.7.0 → plexus_agent-0.7.2}/plexus/sensors/bh1750.py +0 -0
- {plexus_agent-0.7.0 → plexus_agent-0.7.2}/plexus/sensors/bme280.py +0 -0
- {plexus_agent-0.7.0 → plexus_agent-0.7.2}/plexus/sensors/gps.py +0 -0
- {plexus_agent-0.7.0 → plexus_agent-0.7.2}/plexus/sensors/ina219.py +0 -0
- {plexus_agent-0.7.0 → plexus_agent-0.7.2}/plexus/sensors/magnetometer.py +0 -0
- {plexus_agent-0.7.0 → plexus_agent-0.7.2}/plexus/sensors/mpu6050.py +0 -0
- {plexus_agent-0.7.0 → plexus_agent-0.7.2}/plexus/sensors/sht3x.py +0 -0
- {plexus_agent-0.7.0 → plexus_agent-0.7.2}/plexus/sensors/system.py +0 -0
- {plexus_agent-0.7.0 → plexus_agent-0.7.2}/plexus/sensors/vl53l0x.py +0 -0
- {plexus_agent-0.7.0 → plexus_agent-0.7.2}/plexus/streaming.py +0 -0
- {plexus_agent-0.7.0 → plexus_agent-0.7.2}/plexus/tui.py +0 -0
- {plexus_agent-0.7.0 → plexus_agent-0.7.2}/plexus/typed_commands.py +0 -0
- {plexus_agent-0.7.0 → plexus_agent-0.7.2}/scripts/plexus.service +0 -0
- {plexus_agent-0.7.0 → plexus_agent-0.7.2}/scripts/setup.sh +0 -0
- {plexus_agent-0.7.0 → plexus_agent-0.7.2}/tests/test_basic.py +0 -0
- {plexus_agent-0.7.0 → plexus_agent-0.7.2}/tests/test_buffer.py +0 -0
- {plexus_agent-0.7.0 → plexus_agent-0.7.2}/tests/test_can_adapter.py +0 -0
- {plexus_agent-0.7.0 → plexus_agent-0.7.2}/tests/test_config.py +0 -0
- {plexus_agent-0.7.0 → plexus_agent-0.7.2}/tests/test_connector.py +0 -0
- {plexus_agent-0.7.0 → plexus_agent-0.7.2}/tests/test_gps.py +0 -0
- {plexus_agent-0.7.0 → plexus_agent-0.7.2}/tests/test_mavlink_adapter.py +0 -0
- {plexus_agent-0.7.0 → plexus_agent-0.7.2}/tests/test_modbus_adapter.py +0 -0
- {plexus_agent-0.7.0 → plexus_agent-0.7.2}/tests/test_mqtt_adapter.py +0 -0
- {plexus_agent-0.7.0 → plexus_agent-0.7.2}/tests/test_retry.py +0 -0
- {plexus_agent-0.7.0 → plexus_agent-0.7.2}/tests/test_sensor_hub.py +0 -0
- {plexus_agent-0.7.0 → plexus_agent-0.7.2}/tests/test_serial_adapter.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: plexus-agent
|
|
3
|
-
Version: 0.7.
|
|
3
|
+
Version: 0.7.2
|
|
4
4
|
Summary: Send sensor data to Plexus in one line of code
|
|
5
5
|
Project-URL: Homepage, https://plexus.dev
|
|
6
6
|
Project-URL: Documentation, https://docs.plexus.dev
|
|
@@ -79,7 +79,7 @@ Description-Content-Type: text/markdown
|
|
|
79
79
|
|
|
80
80
|
# Plexus Agent
|
|
81
81
|
|
|
82
|
-
**Open-source Python SDK for
|
|
82
|
+
**Open-source Python SDK for hardware observability and telemetry.** Stream sensor data, CAN bus, MAVLink, cameras, and MQTT from any device to [Plexus](https://plexus.company) — the HardwareOps platform for real-time monitoring and fleet management.
|
|
83
83
|
|
|
84
84
|
[](https://pypi.org/project/plexus-agent/)
|
|
85
85
|
[](LICENSE)
|
|
@@ -201,8 +201,8 @@ See [API.md](https://github.com/plexus-oss/agent/blob/main/API.md) for curl, Jav
|
|
|
201
201
|
|
|
202
202
|
## Authentication
|
|
203
203
|
|
|
204
|
-
| Method | How to get it | Used by
|
|
205
|
-
| ----------------- | --------------------------------------------------------- |
|
|
204
|
+
| Method | How to get it | Used by |
|
|
205
|
+
| ----------------- | --------------------------------------------------------- | ------------------------------------ |
|
|
206
206
|
| API key (`plx_*`) | Dashboard → Devices → Add Device, or Settings → Developer | `plexus start` and `Plexus()` client |
|
|
207
207
|
|
|
208
208
|
Two ways to authenticate:
|
|
@@ -245,7 +245,7 @@ plexus start --name "robot-01" # Name the device
|
|
|
245
245
|
|
|
246
246
|
| Flag | Description |
|
|
247
247
|
| ---------------- | --------------------------------------------------- |
|
|
248
|
-
| `-k, --key` | API key (skips interactive auth prompt)
|
|
248
|
+
| `-k, --key` | API key (skips interactive auth prompt) |
|
|
249
249
|
| `-n, --name` | Device name for fleet identification |
|
|
250
250
|
| `--slug` | Device slug (source ID) from dashboard |
|
|
251
251
|
| `--org` | Organization ID from dashboard |
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Plexus Agent
|
|
2
2
|
|
|
3
|
-
**Open-source Python SDK for
|
|
3
|
+
**Open-source Python SDK for hardware observability and telemetry.** Stream sensor data, CAN bus, MAVLink, cameras, and MQTT from any device to [Plexus](https://plexus.company) — the HardwareOps platform for real-time monitoring and fleet management.
|
|
4
4
|
|
|
5
5
|
[](https://pypi.org/project/plexus-agent/)
|
|
6
6
|
[](LICENSE)
|
|
@@ -122,8 +122,8 @@ See [API.md](https://github.com/plexus-oss/agent/blob/main/API.md) for curl, Jav
|
|
|
122
122
|
|
|
123
123
|
## Authentication
|
|
124
124
|
|
|
125
|
-
| Method | How to get it | Used by
|
|
126
|
-
| ----------------- | --------------------------------------------------------- |
|
|
125
|
+
| Method | How to get it | Used by |
|
|
126
|
+
| ----------------- | --------------------------------------------------------- | ------------------------------------ |
|
|
127
127
|
| API key (`plx_*`) | Dashboard → Devices → Add Device, or Settings → Developer | `plexus start` and `Plexus()` client |
|
|
128
128
|
|
|
129
129
|
Two ways to authenticate:
|
|
@@ -166,7 +166,7 @@ plexus start --name "robot-01" # Name the device
|
|
|
166
166
|
|
|
167
167
|
| Flag | Description |
|
|
168
168
|
| ---------------- | --------------------------------------------------- |
|
|
169
|
-
| `-k, --key` | API key (skips interactive auth prompt)
|
|
169
|
+
| `-k, --key` | API key (skips interactive auth prompt) |
|
|
170
170
|
| `-n, --name` | Device name for fleet identification |
|
|
171
171
|
| `--slug` | Device slug (source ID) from dashboard |
|
|
172
172
|
| `--org` | Organization ID from dashboard |
|
|
@@ -28,5 +28,5 @@ from plexus.client import Plexus
|
|
|
28
28
|
from plexus.config import load_config, save_config
|
|
29
29
|
from plexus.typed_commands import param, CommandRegistry
|
|
30
30
|
|
|
31
|
-
__version__ = "0.7.
|
|
31
|
+
__version__ = "0.7.2"
|
|
32
32
|
__all__ = ["Plexus", "param", "CommandRegistry", "load_config", "save_config"]
|
|
@@ -188,6 +188,50 @@ def _mask_key(key: str) -> str:
|
|
|
188
188
|
# Terminal Auth
|
|
189
189
|
# ─────────────────────────────────────────────────────────────────────────────
|
|
190
190
|
|
|
191
|
+
def _select(label: str, options: list, default: int = 0) -> int:
|
|
192
|
+
"""Arrow-key selector. Returns the chosen index."""
|
|
193
|
+
import tty
|
|
194
|
+
import termios
|
|
195
|
+
|
|
196
|
+
selected = default
|
|
197
|
+
fd = sys.stdin.fileno()
|
|
198
|
+
old = termios.tcgetattr(fd)
|
|
199
|
+
|
|
200
|
+
def _render():
|
|
201
|
+
# Move cursor up to overwrite previous render (except first time)
|
|
202
|
+
for i, opt in enumerate(options):
|
|
203
|
+
prefix = click.style(" ›", fg=Style.SUCCESS) if i == selected else " "
|
|
204
|
+
text = click.style(f" {opt}", bold=(i == selected))
|
|
205
|
+
click.echo(f"\r{prefix}{text} ") # trailing spaces clear leftover chars
|
|
206
|
+
|
|
207
|
+
click.echo(click.style(f" {label}", fg=Style.INFO))
|
|
208
|
+
click.echo()
|
|
209
|
+
_render()
|
|
210
|
+
|
|
211
|
+
try:
|
|
212
|
+
tty.setraw(fd)
|
|
213
|
+
while True:
|
|
214
|
+
ch = sys.stdin.read(1)
|
|
215
|
+
if ch == "\r" or ch == "\n":
|
|
216
|
+
break
|
|
217
|
+
if ch == "\x03": # Ctrl-C
|
|
218
|
+
raise KeyboardInterrupt
|
|
219
|
+
if ch == "\x1b": # Escape sequence
|
|
220
|
+
seq = sys.stdin.read(2)
|
|
221
|
+
if seq == "[A": # Up arrow
|
|
222
|
+
selected = (selected - 1) % len(options)
|
|
223
|
+
elif seq == "[B": # Down arrow
|
|
224
|
+
selected = (selected + 1) % len(options)
|
|
225
|
+
# Move cursor up to re-render
|
|
226
|
+
click.echo(f"\x1b[{len(options)}A", nl=False)
|
|
227
|
+
_render()
|
|
228
|
+
finally:
|
|
229
|
+
termios.tcsetattr(fd, termios.TCSADRAIN, old)
|
|
230
|
+
|
|
231
|
+
click.echo()
|
|
232
|
+
return selected
|
|
233
|
+
|
|
234
|
+
|
|
191
235
|
def _terminal_auth(endpoint: str) -> str:
|
|
192
236
|
"""Interactive sign-up / sign-in flow entirely in the terminal.
|
|
193
237
|
|
|
@@ -196,13 +240,8 @@ def _terminal_auth(endpoint: str) -> str:
|
|
|
196
240
|
import requests
|
|
197
241
|
|
|
198
242
|
click.echo()
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
+ click.style(" [signup/signin]", fg=Style.DIM),
|
|
202
|
-
type=click.Choice(["signup", "signin"], case_sensitive=False),
|
|
203
|
-
default="signup",
|
|
204
|
-
show_choices=False,
|
|
205
|
-
).lower()
|
|
243
|
+
choice = _select("New to Plexus?", ["Sign up", "Sign in"], default=0)
|
|
244
|
+
mode = "signup" if choice == 0 else "signin"
|
|
206
245
|
|
|
207
246
|
email = click.prompt(
|
|
208
247
|
click.style(" Email", fg=Style.INFO),
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|