Laboratory hardware support Pieces for the puzzlepiece GUI & automation framework
Project description
Laboratory hardware support Pieces for the puzzlepiece GUI & automation framework.
Puzzlepiece is a GUI-forward Python framework for automating experimental setups and rapid user interface creation. You can find its documentation and tutorial at https://puzzlepiece.readthedocs.io. This library provides “Pieces” (GUI components) for commonly used laboratory hardware, so that you can easily assemble your automation application (a “Puzzle”) out of them.
This package is currently a work in progress. The Pieces shown in the documentation have been fully ported to the new standard, but they may require a version of puzzlepiece that has not been released yet.
Documentation: https://pzp-hardware.readthedocs.io
Repository: https://github.com/jdranczewski/pzp-hardware
Installation
You can install this package from pip:
pip install pzp-hardware
If you would like to develop your own Pieces and contribute changes to this library, you may choose to clone the repository instead, and install a local, editable copy:
git clone https://github.com/jdranczewski/pzp-hardware.git cd pzp-hardware pip install -e .
Once installed, you can use the Pieces provided like you would any other Piece in puzzlepiece:
import puzzlepiece as pzp
from pzp_hardware.thorlabs import camera
app = pzp.QApp()
# Set debug to False to interact with hardware, or you can explore and test in debug mode,
# which is the default, and doesn't require the hardware APIs to be present
puzzle = pzp.Puzzle(debug=False)
puzzle.add_piece("camera", camera.Piece, row=0, col=0)
puzzle.show()
app.exec()
Check out Getting started for more details!
Structure
The library consists of a number of manufacturer folders, with each containing Python files that each interface with a specific hardware/software provided by that manufacturer. The library contains all files on installation, but they need to be specifically imported, so that you never have to import the full library, just the parts you require:
from pzp_hardware.thorlabs import camera, apt_stage from pzp_hardware.vialux import dmd
See Modules for all currently supported hardware.
Development and contributing
Puzzlepiece provides a unified API for all of your devices, so the best laboratory automation experience is if you have Pieces for all of your hardware. If your hardware is not supported by pzp-hardware, you can create a Piece yourself – puzzlepiece aims to make that as easy as possible! You can create a fork of the main repository, and we welcome pull requests adding support for new hardware.
Your Piece should broadly follow the same conventions as the ones currently in the repository. For example, image-based Pieces like cameras, DMDs, or SLMs should have an image param, allowing you to use the standard preview layouts provided in pzp_hardware.generic.mixins.image_preview. Your Piece should work reliably in debug mode to allow testing. You can use puzzlepiece.extras.hardware_tools to make integration with manufacturer APIs and DLLs easier, and in particular you should indicate requirements specific to your Piece with puzzlepiece.extras.hardware_tools.requirements (these are automatically parsed to appear in this documentation).
Documentation is key to your users being able to find, install, and use the Piece. Pull requests that don’t include at least basic documentation for the new Piece will not be merged. Documentation should be included in your Piece’s Python file, mostly as a docstring at the top, with docstrings in the Pieces that you want exposed in the docs. It’s also recommended to include a screenshot of your Piece, but an explicit list of params is not required, as the user can inspect this in debug mode. Check out the template on GitHub.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pzp_hardware-0.1.0.tar.gz.
File metadata
- Download URL: pzp_hardware-0.1.0.tar.gz
- Upload date:
- Size: 36.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d6e53922f7acb3ca5be6730848bb58bb58b99bbe87ce98cd695e537735058eb4
|
|
| MD5 |
4e99886699a9eafd19069a4e218a3eb9
|
|
| BLAKE2b-256 |
b4431b157a36cceee3b947b1a4e9e318c4a0273373034b8d3bf674d510299837
|
Provenance
The following attestation bundles were made for pzp_hardware-0.1.0.tar.gz:
Publisher:
python-publish.yml on jdranczewski/pzp-hardware
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pzp_hardware-0.1.0.tar.gz -
Subject digest:
d6e53922f7acb3ca5be6730848bb58bb58b99bbe87ce98cd695e537735058eb4 - Sigstore transparency entry: 592492775
- Sigstore integration time:
-
Permalink:
jdranczewski/pzp-hardware@595eec27c91ada6f9811987eeff22c29c5478e86 -
Branch / Tag:
refs/tags/v0.2.0fix - Owner: https://github.com/jdranczewski
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@595eec27c91ada6f9811987eeff22c29c5478e86 -
Trigger Event:
release
-
Statement type:
File details
Details for the file pzp_hardware-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pzp_hardware-0.1.0-py3-none-any.whl
- Upload date:
- Size: 38.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ef9b3ab1a8b0e9c1c6993048e9bcdfe4bbf075a1317198cec89d4837395e3afe
|
|
| MD5 |
d1eb63d692a3e08cb062acd9941e4d4d
|
|
| BLAKE2b-256 |
23172133c430d27fb1f0d61a4eda3488f24cffa4563eff8ba489f1aede55d39b
|
Provenance
The following attestation bundles were made for pzp_hardware-0.1.0-py3-none-any.whl:
Publisher:
python-publish.yml on jdranczewski/pzp-hardware
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pzp_hardware-0.1.0-py3-none-any.whl -
Subject digest:
ef9b3ab1a8b0e9c1c6993048e9bcdfe4bbf075a1317198cec89d4837395e3afe - Sigstore transparency entry: 592492782
- Sigstore integration time:
-
Permalink:
jdranczewski/pzp-hardware@595eec27c91ada6f9811987eeff22c29c5478e86 -
Branch / Tag:
refs/tags/v0.2.0fix - Owner: https://github.com/jdranczewski
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@595eec27c91ada6f9811987eeff22c29c5478e86 -
Trigger Event:
release
-
Statement type: