Skip to content

FastAPI overview

PyPNM exposes a FastAPI service that you can run locally (localhost API by default) or deploy to your own infrastructure. Use this section whenever you call the service over HTTP.

Before you start

  • Default base URL: FastAPI host unless overridden via CLI flags (see pypnm CLI).
  • Authentication: none by default; secure deployments should front the API with network ACLs or a proxy.
  • Response envelope: every endpoint returns the standard response schema. Familiarize yourself with it before consuming the API.
  • Errors and retries: see FastAPI status codes for retry guidance and validation failures.

Pick a guide

Section When to use it Common actions
PyPNM Service/system endpoints (health, status, operations). Check health; list operations; fetch service status.
Single capture One-shot capture/queries (downstream, upstream, system). Pull RxMER/FEC once; read event log; spectrum/histogram.
Multi capture Scheduled or multi-snapshot workflows and analysis. Start capture; poll status; download ZIP; stop early.
File management Upload/download files to/from the system. Upload config; download logs; list stored files.
Common schemas Request/response conventions and shared schemas. Review request schema; response wrapper; error model.
Status codes API status and error codes. Map errors to fixes; see retry/validation guidance.