A library for the Plesty ecosystem.
Project description
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+
- Runtime dependencies are defined in pyproject.toml
Installation
Install from package index:
pip install plesty-lib
Or install from source in editable mode:
pip install -e .
Quick Start
1. Create a device class from a base device
from plestylib.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
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.
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 plesty_lib-0.1.0.tar.gz.
File metadata
- Download URL: plesty_lib-0.1.0.tar.gz
- Upload date:
- Size: 5.1 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0f333329c122b4be67b45c05eaecb75cfc6144a9942fdd8ac7bdcc82297e2d47
|
|
| MD5 |
a880bdf754e7d83859c4180aa365993f
|
|
| BLAKE2b-256 |
ac63789a4797baf719ee8090f4c7e82976a89f9f25d4af6e60a44ac7ee051517
|
File details
Details for the file plesty_lib-0.1.0-py3-none-any.whl.
File metadata
- Download URL: plesty_lib-0.1.0-py3-none-any.whl
- Upload date:
- Size: 77.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
709f7e0568320793bdedfb037bf675a5822af351569b8a532137c17644a4f351
|
|
| MD5 |
a96ec7daed7910731b6538912dc9367d
|
|
| BLAKE2b-256 |
290eda4728aa39a4dcc17c1382b3177ccb61202e9c252a4811f2011225741f81
|