Skip to Content
Addon DevelopmentAdding Python services

Adding Python services

When to use Python

  • Heavy numpy/opencv pipelines
  • Vendor SDKs only available in Python
  • GPIO experiments (prefer dedicated microservices with root drop)

Layout

python/ ├── service.py ├── requirements.txt └── README.md

requirements.txt

httpx==0.27.0 orjson==3.10.0

IPC

Expose a localhost WebSocket or Unix socket on 127.0.0.1 — Node addon code connects via http.internalConnect.

⚠️ Warning: Never bind 0.0.0.0 for addon IPC — other LAN hosts could trigger GPU/CPU exhaustion attacks.

Packaging

Marketplace build runs pip install -r requirements.txt inside an isolated venv managed by core.

Troubleshooting

Import errors
Pin versions — Pi wheels for numpy differ by arch; test on aarch64 hardware.

Last updated on

Was this helpful?