Skip to main content

Drivers

This is a set of Python drivers for lab instrumentation. These drivers are associated with nspyre, but are also suitable for general usage. Unless otherwise specified, drivers are provided under the terms of the MIT license.

Installation

pip install nspyre-drivers

Certain drivers require extra dependencies. Those dependencies can be installed by specifying a tag during the install. E.g. to install the DLI pdu driver dependencies, use:

pip install nspyre-drivers[dli_pdu]

A full listing of the tags is below.

beaglebone
dli_pdu
oceanoptics
ximea
zaber

For some USB drivers on Linux, you need to grant user access to the drivers in order for VISA to detect them: You should find the udev rules file in the same folder as the driver, then, e.g.:

sudo cp src/drivers/thorlabs/cld1010/99-thorlabs-cld1010.rules /etc/udev/rules.d/

Create a user group for the usb device access:

sudo groupadd usbtmc

Add any relevant users to the group:

usermod -aG usbtmc <myuser>

Reboot for the changes to take effect.

Usage

After installation, you can use drivers with, e.g.:

from nspyre_drivers.rohde_schwarz.hmp4040.hmp4040 import HMP4040
with HMP4040('TCPIP::192.168.0.10::5025::SOCKET') as power_supply:
	# set the power supply channel 1 to 5V
	power_supply.set_voltage(1, 5.0)

See the source for all of the available drivers and the import paths.

Other Drivers

In order to minimize reinventing the wheel, below is a list of other sources of python instrument drivers. Please contribute if you find other useful sources!

pycobolt

Contributing

If you want to contribute driver code, please submit it as a pull request. This project uses poetry. If your driver requires specific dependencies beyond those currently in use in the project, you should include them in the pyproject.toml file as extras. See the poetry documentation for specifics on how to declare these dependencies.

Metadata

Release files for nspyre-drivers 0.1.6

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

Source distribution (sdist)

Source distribution for nspyre-drivers 0.1.6
File Size Uploaded
nspyre-drivers-0.1.6.tar.gz 1.1 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for nspyre-drivers 0.1.6
File Interpreter ABI Platform
nspyre_drivers-0.1.6-py3-none-any.whl Python 3 none any Details

Total release size: 2.3 MB

Release files / nspyre-drivers-0.1.6.tar.gz

Download URL nspyre-drivers-0.1.6.tar.gz
Size 1.1 MB
Tags Source
SHA-256 checksum
How to use checksums
d5b437da537a091211930ffb2d39405788317f02c6868e53c6eb15532e267648
BLAKE2b-256 checksum
How to use checksums
8fe153c7f6b63289210e9dd82158bd1ef733e17180fdd82cf4e7ca158da6c969
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.12 CPython/3.10.6 Linux/5.19.0-41-generic

Release files / nspyre_drivers-0.1.6-py3-none-any.whl

Download URL nspyre_drivers-0.1.6-py3-none-any.whl
Size 1.1 MB
Tags Python 3
SHA-256 checksum
How to use checksums
148dadf00d52fcd3a74df7607620ba2020169f3d5f8f32595b87363d9e92bb7a
BLAKE2b-256 checksum
How to use checksums
881a3966caae37691a7a4f110f783b8bf2b4ecf84189263bbce6f664344af8dd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.12 CPython/3.10.6 Linux/5.19.0-41-generic

Release history Release notifications | RSS feed

This release

0.1.6 This release

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release 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