Skip to main content

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:

  1. Device lifecycle and synchronous device models
  2. Transport/traffic management (Serial, VISA, TCP/IP)
  3. Command and operation solvers (for example SCPI and operation-message protocols)
  4. Parameter and function metadata systems
  5. 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
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:

  1. Base device model: operation entry points and parameter/function systems
  2. Command/operation solver: map standardized calls to protocol payloads
  3. Traffic manager: transport-specific I/O with real hardware
  4. 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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

plesty_lib-0.3.6.tar.gz (587.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

plesty_lib-0.3.6-py3-none-any.whl (324.9 kB view details)

Uploaded Python 3

File details

Details for the file plesty_lib-0.3.6.tar.gz.

File metadata

  • Download URL: plesty_lib-0.3.6.tar.gz
  • Upload date:
  • Size: 587.0 kB
  • Tags: Source
  • Uploaded using 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}

File hashes

Hashes for plesty_lib-0.3.6.tar.gz
Algorithm Hash digest
SHA256 869caa5c2c99f61ccf70e7f3d8781c5248811c1c3eaab1b05737b9d3b88de0e7
MD5 6e285d0c498bdc8e10ed1f4d3e9030c5
BLAKE2b-256 a3cb0ad9cc7b18d01e96c2f5d22a220d2ad215a83c9568cc8d8783fce57dfec8

See more details on using hashes here.

File details

Details for the file plesty_lib-0.3.6-py3-none-any.whl.

File metadata

  • Download URL: plesty_lib-0.3.6-py3-none-any.whl
  • Upload date:
  • Size: 324.9 kB
  • Tags: Python 3
  • Uploaded using 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}

File hashes

Hashes for plesty_lib-0.3.6-py3-none-any.whl
Algorithm Hash digest
SHA256 05ccea989c652036f3d8085da56bbe0ea46061a014e53686bb39adff47134efd
MD5 613ea2c45ffcf1d88fa1e99091d10553
BLAKE2b-256 8fb5fdc6be287bd9a5087e7e5095d16c27c0bb4dba7648dcbf6a7c5acbe11438

See more details on using hashes here.

Release history Release notifications | RSS feed

0.4.0

2 files

This release

0.3.6 This release

2 files

0.3.5

2 files

0.3.4

2 files

0.3.3

2 files

0.3.2

2 files

0.3.1

2 files

0.3.0

2 files

0.2.9

2 files

0.2.8

2 files

0.2.7

2 files

0.2.6

2 files

0.2.5

2 files

0.2.4

2 files

0.2.3

2 files

0.2.2

2 files

0.2.1

2 files

0.2.0

1 file

0.1.1

2 files

0.1.0

2 files

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