Edge-optimized Cocapn fleet packages for ARM64 devices with limited resources
Project description
plato-edge
Edge-optimized Cocapn fleet packages for ARM64 devices with limited resources.
Target Hardware
- NVIDIA Jetson Orin (ARM64)
- 24 GB RAM shared with GPU
- Python 3.8+ (system default on JetPack)
Design Goals
| Goal | Constraint |
|---|---|
| Zero external dependencies | stdlib only |
| Installed size | < 50 KB total |
| Runtime memory | < 10 MB RSS combined |
| Network | Works fully offline after install |
| ML frameworks | No numpy, scipy, torch, etc. |
Modules
plato_edge.tile_spec
Lightweight tile format for spatial/data tiling.
- Compact binary encoding (~22-byte header + payload)
- Optional metadata as NUL-delimited key/value pairs
- Bounds validation with configurable limits
- No optional dependencies
from plato_edge import Tile, TileCodec
tile = Tile(x=1, y=2, z=3, payload=b"hello", meta={"k": 42})
data = TileCodec.encode(tile)
tile2 = TileCodec.decode(data)
plato_edge.deadband
P0/P1/P2 priority gate using minimal regex.
- No NLP, no heavy text processing
- Configurable regex patterns per priority level
- Fast default patterns for
ALERT,WARN,HEARTBEAT, etc.
from plato_edge import classify, DeadbandGate
level = classify("ALERT: engine failure") # -> DeadbandGate.P0
plato_edge.flywheel
In-memory pub/sub and key-value cache.
- Thread-safe with fine-grained locking
- Optional per-key TTL
- Automatic eviction when capacity limits are reached
- No persistence — everything is in-memory
from plato_edge import Flywheel
fw = Flywheel(max_kv=4096, max_queue=256)
fw.set("key", "value", ttl=60.0)
fw.subscribe("topic", lambda msg: print(msg))
fw.publish("topic", "hello")
plato_edge.keeper
UDP discovery beacon replacing HTTP-based service discovery.
- Zero-dependency UDP broadcast/multicast
- JSON ping/pong protocol
- Threaded listener with daemon thread
from plato_edge import Beacon
with Beacon(port=37201, identity={"role": "camera"}) as b:
peers = b.ping(host="255.255.255.255", timeout=1.0)
plato_edge.explain
Stripped explainability — trace IDs only, no full audit log.
- 24-character hex trace IDs (time + random)
- In-memory span tracking with nanosecond resolution
- Automatic span eviction when limit is reached
from plato_edge import Tracer
tr = Tracer(max_spans=1024)
tid, t0 = tr.start("inference")
# ... work ...
tr.end(tid, t0, meta={"status": "ok"})
print(tr.spans(tid))
Installation
pip install plato-edge
Development
python -m pytest tests/
License
MIT
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 plato_edge-0.1.0.tar.gz.
File metadata
- Download URL: plato_edge-0.1.0.tar.gz
- Upload date:
- Size: 9.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d6f3f8198c8e3476f9cc937319f9d33cdf3c8eead3c3e5bc46c219be38ae16aa
|
|
| MD5 |
32b4e131f46cb11ceaee65790bb83a97
|
|
| BLAKE2b-256 |
c629b340d0a3a2c65b0eb20928718f83ac69cd319fba411ffa4ae001fa2d544c
|
File details
Details for the file plato_edge-0.1.0-py3-none-any.whl.
File metadata
- Download URL: plato_edge-0.1.0-py3-none-any.whl
- Upload date:
- Size: 10.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
34fec1c75cb73c9d16e1d6510b1461f7dbe028dc41d996af48ade8785f50d8e2
|
|
| MD5 |
f89ed58dac99f2d9339022e9c4cf9abe
|
|
| BLAKE2b-256 |
29fc4095bf0e08411bde75317cd5089397dee7949a8301aabf3c2b5e6d6f3c05
|