Skip to content

Adding a Python integration

The desktop app must not learn how each service is launched. Register it in the supervisor.

  1. Add the module and pin dependencies in sidecar/dtam/pyproject.toml or runtime/python/requirements-runtime.txt (numpy 2 compatible).
  2. Register a ServiceDef in runtime/python/adelpha_runtime/registry.py:
  3. unique id
  4. required / start (always vs lazy)
  5. mount_factory (in-process ASGI) or child_factory (isolated process)
  6. health path, restart policy, version, description
  7. If it is HTTP, mount it under /api/<id>/ in runtime/python/adelpha_runtime/gateway.py or reverse-proxy an internal port. Do not expose a new fixed port to the frontend.
  8. Declare PyInstaller datas / hiddenimports in runtime/python/adelpha-python-runtime.spec.
  9. Add tests in runtime/python/tests/ (startup, health, failure, cleanup).
  10. Rebuild the sidecar on each OS/arch (make sidecar).
  11. Produce installers (make dist-current / CI matrix).

The React client should keep using /api/<name> on the injected supervisor base URL plus the session token.