Skip to main content

FNIRSI DPS-150

Small synchronous Python library for controlling an FNIRSI DPS-150 over USB serial.

Credit

This project’s packet layout, command IDs, and initial protocol assumptions were derived from the reverse-engineering work published by cho45 in cho45/fnirsi-dps-150. This library reimplements that protocol in Python and validates behavior against a real connected DPS-150 device.

Setup

python -m pip install fnirsi-dps150

Development Setup

python3 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
python -m pip install ".[dev]"

Usage

from fnirsi_dps150 import DPS150

with DPS150("/dev/cu.usbmodem146061B040251") as dps:
    dps.set_voltage(5.0)
    dps.set_current(1.0)
    print(dps.read_voltage())
    print(dps.read_current())
    print(dps.read_state())

CLI

source .venv/bin/activate
fnirsi-dps150 --port /dev/cu.usbmodem146061B040251 read-state
fnirsi-dps150 --port /dev/cu.usbmodem146061B040251 read-voltage
fnirsi-dps150 --port /dev/cu.usbmodem146061B040251 read-current
fnirsi-dps150 --port /dev/cu.usbmodem146061B040251 set-voltage 5.0
fnirsi-dps150 --port /dev/cu.usbmodem146061B040251 set-current 0.5
fnirsi-dps150 --port /dev/cu.usbmodem146061B040251 output-on
fnirsi-dps150 --port /dev/cu.usbmodem146061B040251 output-off

Hardware Validation

Run the real-device script:

source .venv/bin/activate
python scripts/validate_device.py

License

MIT. See LICENSE.

Publishing

Build artifacts for manual upload:

python -m pip install --upgrade build twine
python -m build
python -m twine check dist/*
python -m twine upload dist/*

Metadata

Release files for fnirsi-dps150 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fnirsi-dps150 1.0.0
File Size Uploaded Provenance Actions
fnirsi_dps150-1.0.0.tar.gz 11.5 kB Without provenance Details for fnirsi_dps150-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for fnirsi-dps150 1.0.0
File Interpreter ABI Platform Actions
fnirsi_dps150-1.0.0-py3-none-any.whl Python 3 none any Details for fnirsi_dps150-1.0.0-py3-none-any.whl

Total release size: 21.0 kB

Release files / fnirsi_dps150-1.0.0.tar.gz

Download URL fnirsi_dps150-1.0.0.tar.gz
Size 11.5 kB
Tags Source
SHA-256 checksum
How to use checksums
9cf84b325373437115fbd86d414225d3ef5eff2924352ab0ae32eb8360a01ce3
BLAKE2b-256 checksum
How to use checksums
3206e91b5dd85d3c49de5d1fb4d91efaee875c982ab6baa6612f8be67bcd287c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.2

Release files / fnirsi_dps150-1.0.0-py3-none-any.whl

Download URL fnirsi_dps150-1.0.0-py3-none-any.whl
Size 9.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4bb4e2dea32a8afb38af717b8160d91d5eabb893961022636f1d5dc07b6912ff
BLAKE2b-256 checksum
How to use checksums
7a9d9fe0a8102f8f72433aa93f86af83d1a89e4d02b005bc29a7463950ef0d87
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.2

Security for fnirsi-dps150 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page