ppk2-api
API for Nordic Semiconductor's Power Profiler Kit II (PPK 2).
What it is and what it does
ppk2-api is a Python wrapper around Nordic Semiconductor's Power Profiler Kit II hardware, enabling automated power consumption measurement and logging without the GUI. It communicates with the PPK 2 device over a serial port and provides methods to configure measurement modes, set voltage levels, and stream power samples in real time.
The package offers two usage patterns: a basic synchronous API that reads samples on demand, and a multiprocessing variant that runs a background polling process to buffer up to 10 seconds of data, reducing the frequency of manual polling. It is cross-platform and requires only pyserial as a runtime dependency, making it suitable for embedded test automation, power profiling in CI/CD pipelines, and long-term power monitoring applications.
Use it for:
- Automated power consumption testing in embedded device development workflows and CI/CD pipelines
- Long-term power monitoring and data logging for battery-powered device optimization
- Real-time power measurement during firmware development without manual GUI interaction
- Batch power profiling across multiple device configurations or firmware variants
- Integration of power metrics into test reports and performance dashboards
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides a Python API to automate power consumption measurement and data logging with Nordic Semiconductor's Power Profiler Kit II (PPK 2) over a serial connection.
Yes, if you own a PPK 2 and need automated power measurement. The package is actively maintained, has low install friction, and fills a genuine gap (no official automation support). The GPLv2 license is a consideration for proprietary projects. The 1162-day gap since first release and over a year since the last release suggest the core API is stable but may not be under active feature development.
Install
ppk2-api on PyPI
pip
pip install ppk2-apiuv
uv add ppk2-apipoetry
poetry add ppk2-apiInstalling ppk2-api
Before you install
Low install friction with a single runtime dependency (pyserial). Package is actively maintained with recent commits and a modest but engaged user base, though last release was over a year ago.
License in practice
Licensed under GPLv2 (copyleft). Any derivative work or modifications must be shared under the same license terms. Suitable for open-source projects; proprietary software integration requires careful review.
Quickstart
from ppk2_api import PPK2_API
import time
ppk2 = PPK2_API("/dev/ttyACM0") # adjust serial port
ppk2.use_source_meter()
ppk2.set_source_voltage(3300)
ppk2.start_measuring()
for i in range(10):
data = ppk2.get_data()
if data:
samples = ppk2.get_samples(data)
print(f"Avg: {sum(samples)/len(samples)}uA")
time.sleep(0.1)
ppk2.stop_measuring()
Requires a PPK 2 device connected to a serial port; the serial port path must be known and accessible to the Python process.
Verify before relying
- Whether Python version support is truly unspecified or if there is a practical minimum (e.g., Python 3.6+)
- Current state of 'in progress' features (data logging formats, full GUI parity) and their timeline
- Whether multiprocessing mode is production-ready or still experimental
Package facts
| License | not declared (copyleft) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — pyserial |
| Maintenance | actively maintained — 1,162 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 85,221/month — #13,941 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: ppk2_api-0.9.2-py3-none-any.whl
Tags
More Monitoring packages
Wraps any iterable to display a real-time…
copyleft · top 100 on PyPI
opentelemetry-semantic-conventionsProvides generated Python code for…
permissive · top 100 on PyPI
opentelemetry-sdkProvides the reference implementation of the…
permissive · top 100 on PyPI
opentelemetry-apiProvides the abstract API and interfaces for…
permissive · top 100 on PyPI
opentelemetry-exporter-otlp-proto-httpExports OpenTelemetry observability data to an…
permissive · top 1,000 on PyPI
opentelemetry-instrumentationProvides automatic instrumentation commands and…
permissive · top 1,000 on PyPI
joulescopeJoulescope is a Python driver for the…
permissive · top 15,000 on PyPI
p1monitorAsynchronous Python client library for reading…
permissive · top 15,000 on PyPI
ovoenergyA Python client library for querying energy…
permissive · top 15,000 on PyPI
pyroscope-ioPyroscope-io is a continuous profiling agent…
permissive · top 5,000 on PyPI
google-cloud-profilerCollects and uploads CPU, memory, and wall-time…
permissive · top 15,000 on PyPI
py-spypy-spy is a sampling profiler that attaches to…
permissive · top 1,000 on PyPI
dlipowerManages Digital Loggers web-based network power…
permissive · top 15,000 on PyPI
pyjoulescope-driverPython bindings for the Joulescope DC energy…
permissive · top 15,000 on PyPI
scaleneScalene profiles Python code to measure CPU,…
permissive · top 15,000 on PyPI
zigpy-deconzProvides a Python interface to deCONZ-based…
copyleft · top 15,000 on PyPI