Skip to main content

PSLab Python Library

The Python library for the Pocket Science Lab from FOSSASIA.

Build Status Gitter Codacy Badge Mailing List Twitter Follow

This repository hosts the Python library for communicating with the Pocket Science Lab open hardware platform (PSLab). Using this library you can communicate with the PSLab using simple Python code. The Python library is also used by the PSLab GUI as a backend component.

The goal of PSLab is to create an Open Source hardware device (open on all layers) and software applications that can be used for experiments by teachers, students and scientists. Our tiny pocket lab provides an array of instruments for doing science and engineering experiments. It provides functions of numerous measurement tools including an oscilloscope, a waveform generator, a logic analyzer, a programmable voltage and current source, and even a component to control robots with up to four servos.

For more information see https://pslab.io.

Buy

Installation

pslab-python can be installed from PyPI:

$ pip install pslab

Note: Linux users must either install a udev rule by running 'pslab install' as root, or be part of the 'dialout' group in order for pslab-python to be able to communicate with the PSLab device.

Note: Windows users who use the PSLab v6 device must download and install the CP210x Windows Drivers from the Silicon Labs website in order for pslab-python to be able to communicate with the PSLab device.

Note: If you are only interested in using PSLab as an acquisition device without a display/GUI, only pslab-python needs to be installed. If you would like a GUI, install the pslab-desktop app and follow the instructions of the Readme in that repo.

Validate installation

  1. Plug in the PSLab device and check that both the LEDs light up.
  2. The following piece of code should run without errors:
from pslab import ScienceLab
psl = ScienceLab()
capacitance = psl.multimeter.measure_capacitance()
print(capacitance)

Communication

Wherever we interact, we strive to follow the FOSSASIA Code of Conduct.

Contributing

See CONTRIBUTING.md to get started.

License

Copyright (C) 2014-2021 FOSSASIA

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 3.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Metadata

Release files for pslab 4.0.1

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

Source distribution (sdist)

Source distribution for pslab 4.0.1
File Size Uploaded
pslab-4.0.1.tar.gz 126.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pslab 4.0.1
File Interpreter ABI Platform
pslab-4.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 249.8 kB

Release files / pslab-4.0.1.tar.gz

Download URL pslab-4.0.1.tar.gz
Size 126.9 kB
Tags Source
SHA-256 checksum
How to use checksums
8a4d6834ba1b7af5481f5f17eb5ce6f2f87e3cecda3babb85dcd4f06ded167b1
BLAKE2b-256 checksum
How to use checksums
4180cc02ad8b5f89d8585ed202074dacb26d95c95ea6fbea20909cade535b5b6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 16, 2025.

Transparency log

Release files / pslab-4.0.1-py3-none-any.whl

Download URL pslab-4.0.1-py3-none-any.whl
Size 122.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0694ca286a93c3bba38ed9dcd7ed24ddabc9f005b886164934a9b26c54855e07
BLAKE2b-256 checksum
How to use checksums
f88e7010e8ed3cf76e7686332dc3d20ca3136e7fd99a84c96ed69469160728d6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 16, 2025.

Transparency log
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