Skip to main content

DOCSIS 3.x/4.0 Proactive Network Maintenance Toolkit

Project description

PyPNM Logo

PyPNM - Proactive Network Maintenance Toolkit

PyPNM Version PyPI - Version PyPI - Python Version Daily Build macOS CI CodeQL PyPI Install Check Kubernetes (kind) GHCR Publish Dockerized License: Apache-2.0 Ubuntu

PyPNM is a DOCSIS 3.x/4.0 Proactive Network Maintenance toolkit for engineers who want repeatable, scriptable visibility into modem health. It can run purely as a Python library or as a FastAPI web service for real-time dashboards and offline analysis workflows.

Table of contents

Choose your path

Path Description
Kubernetes deploy (kind) Run PyPNM in a local kind cluster (GHCR image).
Docker deploy Install and run the containerized PyPNM service.
Use PyPNM as a library Install pypnm-docsis into an existing Python environment.
Run the full platform Clone the repo and use the full FastAPI + tooling stack.

Kubernetes | Docker

Docker (Recommended) - Install Docker | Install PyPNM Container | Commands

Fast install (helper script; latest release auto-detected):

TAG="v1.5.5.0"
PORT=8080

curl -fsSLo install-pypnm-docker-container.sh \
  https://raw.githubusercontent.com/PyPNMApps/PyPNM/main/scripts/install-pypnm-docker-container.sh

chmod +x install-pypnm-docker-container.sh

sudo ./install-pypnm-docker-container.sh --tag ${TAG} --port ${PORT}

Update an existing Docker deployment in place:

sudo ./install.sh --update
sudo ./install.sh --update v1.5.3.0

--update stops the existing PyPNM compose stack, removes old PyPNM containers/images, then reinstalls using the requested tag or the latest release when no tag is provided. Internally, install.sh delegates to the Docker update helper under scripts/.

If Docker isn’t on your host yet, follow the Install Docker prerequisites guide first.

More Docker options and compose workflows: PyPNM Docker Installation and Developer Workflow.

Kubernetes (kind) dev clusters

Kubernetes quick links:

We continuously test the manifests with a kind-based CI smoke test (Kubernetes (kind) badge above). Follow the kind quickstart or the detailed deployment guide to run PyPNM inside a local single-node cluster; multi-node scenarios are not covered yet (see pros/cons).

Script-only deployment (no repo clone) is documented in PyPNM deploy.

Prerequisites

Operating systems

Linux, validated on:

  • Ubuntu 22.04 LTS
  • Ubuntu 24.04 LTS

Other modern Linux distributions may work but are not yet part of the test matrix.

Shell dependencies

From a fresh system, install Git:

sudo apt update
sudo apt install -y git

Python and remaining dependencies are handled by the installer.

Getting started

Install from PyPI (library only)

If you only need the library, install from PyPI:

python3 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
pip install pypnm-docsis

Uninstall and cleanup:

pip uninstall pypnm-docsis
rm -f ~/.ssh/pypnm_secrets.key

FastAPI Service and Development

1) Clone

git clone https://github.com/PyPNMApps/PyPNM.git
cd PyPNM

2) Install

Run the installer:

./install.sh

Common flags (use as needed):

Flag Purpose
--development Installs Docker Engine + kind/kubectl. See Development Install.
--clean Removes prior install artifacts (venv/build/dist/cache) before installing. Preserves data and system configuration.
--purge-cache Clears pip cache after activating the venv (use with --clean when troubleshooting stale installs).
--pnm-file-retrieval-setup Launches tools/pnm/pnm_file_retrieval_setup.py after install. See the PNM File Retrieval Overview.
--demo-mode Seeds demo data/paths for offline exploration. See the demo mode guide.
--production Reverts demo-mode changes and restores your previous system.json backup.

Installer extras: adds shell aliases when available; source your rc file once to pick them up.

3) Activate the virtual environment

If you used the installer defaults, activate the .env environment:

source .env/bin/activate

4) Configure system settings

System configuration lives in deploy/docker/config/system.json.

5) Run the FastAPI service launcher

HTTP (default: http://127.0.0.1:8000):

pypnm serve

Development hot-reload:

pypnm serve --reload

Optional route policy controls:

pypnm serve --mute-tags "PNM Operations - Multi-Downstream OFDM RxMER"
pypnm serve --mute-tags "Orchestrator,Operational" --mute-tags-hard

6) (Optional) Serve the documentation

HTTP (default: http://127.0.0.1:8001):

mkdocs serve

7) Explore the API

Installed services and docs are available at the following URLs:

Git Clone Docker
FastAPI Swagger UI FastAPI Swagger UI
FastAPI ReDoc FastAPI ReDoc
MkDocs docs MkDocs docs

Recommendations - Postman-PyPNMApps-API

The companion Postman-PyPNMApps-API repo provides a maintained Postman collection, environments, and Postman visualizers for PyPNM FastAPI endpoints. It is intended for quick endpoint testing, capture/analysis workflow validation, and operator-friendly response visualization (tables/graphs) without writing custom client code.

Documentation

SNMP notes

  • SNMPv2c is supported
  • SNMPv3 is currently stubbed and not yet supported

CableLabs specifications & MIBs

PNM architecture & guidance

License

Apache License 2.0 and NOTICE

Next steps

Maintainer

Maurice Garcia

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

pypnm_docsis-1.5.5.0.tar.gz (1.4 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pypnm_docsis-1.5.5.0-py3-none-any.whl (1.4 MB view details)

Uploaded Python 3

File details

Details for the file pypnm_docsis-1.5.5.0.tar.gz.

File metadata

  • Download URL: pypnm_docsis-1.5.5.0.tar.gz
  • Upload date:
  • Size: 1.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pypnm_docsis-1.5.5.0.tar.gz
Algorithm Hash digest
SHA256 03cc8e4649bd55f0bec7908cb07e9d810bd9ea7359b524e5105c35fbcacf0221
MD5 a55ab32ae642efb62b8e460d56bb7ab3
BLAKE2b-256 3dbf3242bef9416e2811333f23a913b70ef301dcf9792296ffe5cb4e01f77abe

See more details on using hashes here.

File details

Details for the file pypnm_docsis-1.5.5.0-py3-none-any.whl.

File metadata

  • Download URL: pypnm_docsis-1.5.5.0-py3-none-any.whl
  • Upload date:
  • Size: 1.4 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pypnm_docsis-1.5.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9fa94736b99ebd4abb03abc0dace109984b138de66b1971eb8eaa35699fafb24
MD5 7e14732ff00ff03b57c97c0ea94ccdd3
BLAKE2b-256 809de2945e2abfae908f081a5b406a6a63092747e1cdd6a346f1fa499870306f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page