This release is a pre-release and may not be stable for production use.
PlestyLib
PlestyLib is the core Python library in the PLESTY ecosystem for building standardized device APIs for laboratory and experimental automation.
It provides reusable abstractions for:
- Device lifecycle and synchronous device models
- Transport/traffic management (Serial, VISA, TCP/IP)
- Command and operation solvers (for example SCPI and operation-message protocols)
- Parameter and function metadata systems
- Auto testing helpers, logging, and error-handling utilities
Requirements
- Python 3.12+
Installation
Install from package index:
pip install plesty-lib
# or
uv add plesty-lib
Optional dependencies
Features that need a heavy or platform-specific package keep it out of the
base install and behind an extra. Without the extra the feature raises an
ImportError naming it; nothing else is affected.
| Extra | Adds | Enables |
|---|---|---|
hdf5 |
h5py |
convert_to_hdf5 — packs saved results into one HDF5 archive |
fit |
scipy |
SpectrumFit analyzer — Gaussian / Lorentzian / Voigt spectrum fits |
pip install "plesty-lib[hdf5]"
# or
uv add "plesty-lib[hdf5]"
For development, install from source and sync the dev dependency group:
uv sync --group dev
# or
pip install -e .
pip install plesty-sdk
Quick Start
1. Create a device class from a base device
from plesty.lib.device.base_visa_scpi_device import BaseVisaScpiDevice
class PowermeterDevice(BaseVisaScpiDevice):
def __init__(self, address: str):
super().__init__(address)
self.register_config("POWER", dtype=float, read_only=True, command="MEAS:SCAL:POW")
self.register_config("WAVELENGTH", dtype=int, unit="nm", command="SENS:CORR:WAV")
2. Use the device
# replace the serial number P0000001 with that of your own device
address = "USB0::0x1313::0x8078::P0000001::INSTR"
with PowermeterDevice(address) as dev:
print(dev.identity())
print(dev.query("POWER"))
Architecture Overview
PlestyLib encourages a layered device API design:
- Base device model: operation entry points and parameter/function systems
- Command/operation solver: map standardized calls to protocol payloads
- Traffic manager: transport-specific I/O with real hardware
- Optional wrappers: async and TCP/IP service/client patterns
This separation keeps implementations testable and easier to maintain.
License
Plesty is licensed under the GNU Lesser General Public License v3.0 or later (LGPL-3.0-or-later). See the LICENSE file.
Release files for plesty-lib 0.5.0.dev5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| plesty_lib-0.5.0.dev5.tar.gz | 821.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| plesty_lib-0.5.0.dev5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 1.3 MB
Release files / plesty_lib-0.5.0.dev5.tar.gz
| Download URL | plesty_lib-0.5.0.dev5.tar.gz |
|---|---|
| Size | 821.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d401b4caec7647710c554eb2ad35c2d9d915415653d9fc9c3132d8795eb0b0d6
|
|
BLAKE2b-256 checksum How to use checksums |
87921ce7b87c1d4a0d02674ba51b93379557a61a14ab27947d1b96f2628878ae
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.30 {"installer":{"name":"uv","version":"0.9.30","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"12","id":"bookworm","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / plesty_lib-0.5.0.dev5-py3-none-any.whl
| Download URL | plesty_lib-0.5.0.dev5-py3-none-any.whl |
|---|---|
| Size | 485.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
373a3040a479cc90d7bb947ed0d1a7678c8d331bc5da55e5084fc5ac260a4978
|
|
BLAKE2b-256 checksum How to use checksums |
2539a828ed3031075e3060fb372d7c45682c09a5b5631c12a063861377f24af7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.30 {"installer":{"name":"uv","version":"0.9.30","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"12","id":"bookworm","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|