Skip to main content

pylint PyPI PyPI - Python Version PyPI - Status License: GPL v3 code style

async_gpib

Python3 asyncio Linux GPIB Wrapper. The library requires Python asyncio and is a thin wrapper for the threaded Linux GPIB Wrapper library.

The library is fully type-hinted.

Supported Devices

Instruments

Device Supported Tested Comments
Fluke 5440B ✔️ ✔️
HP 3478A ✔️ ✔️

Setup

There are currently no packages for Linux GPIB available on all platforms. To install the library it is required to install Linux GPIB.

Linux GPIB:

These instructions are for Ubuntu:

sudo apt install subversion build-essential autoconf libtool flex bison python3-dev
svn checkout svn://svn.code.sf.net/p/linux-gpib/code/trunk linux-gpib-code
cd ~/linux-gpib-code/linux-gpib-kernel
make
sudo make install  # ignore the signing errors
sudo groupadd gpib  # seems not to be installed
sudo modprobe ni_usb_gpib
cd ~/linux-gpib-code/linux-gpib-user
./bootstrap
./configure --sysconfdir=/etc
make
sudo make install
sudo ldconfig

Linux GPIB Python module:

Once Linux GPIB is installed, you can either install the python package or use the gpib-ctypes package.

python3 -m venv env  # virtual environment, optional
source env/bin/activate
pip install -e ~/linux-gpib-code/linux-gpib-user/language/python/

async_gpib Python module

The package can be directly installed via Pypi:

python3 -m venv env  # virtual environment, optional
source env/bin/activate
pip install async-gpib

Usage

Initialize the GPIB adapter

from async_gpib import AsyncGpib

# Create a controller and talk to device address 22
async with AsyncGpib(name=0, pad=22) as gpib_device:
    # Add your code here
    ...

See examples/ for more working examples.

Support for Multiple Devices

⚠️ Concurrency with multiple devices: Note, that when using a single adapter to control multiple devices, there is no concurrency on the GPIB bus. This means, there is no speed increase, when making asynchronous reads from multiple devices on the bus regarding the transfer time.

Versioning

I use SemVer for versioning. For the versions available, see the tags on this repository.

Documentation

I use the Numpydoc style for documentation.

Authors

License

This project is licensed under the GPL v3 license - see the LICENSE file for details

Metadata

Release files for async-gpib 2.1.4

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

Source distribution (sdist)

Source distribution for async-gpib 2.1.4
File Size Uploaded
async_gpib-2.1.4.tar.gz 19.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for async-gpib 2.1.4
File Interpreter ABI Platform
async_gpib-2.1.4-py3-none-any.whl Python 3 none any Details

Total release size: 39.0 kB

Release files / async_gpib-2.1.4.tar.gz

Download URL async_gpib-2.1.4.tar.gz
Size 19.8 kB
Tags Source
SHA-256 checksum
How to use checksums
1eb54890cd0e823decf5653c4da35a01fefce61b04b451b92732ea2eb087e789
BLAKE2b-256 checksum
How to use checksums
69104c935bbd9086b0477309547d3b81ef06ebf395fae636a46b4a5d941599df
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.5

Release files / async_gpib-2.1.4-py3-none-any.whl

Download URL async_gpib-2.1.4-py3-none-any.whl
Size 19.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e4c0eb794fd2ccbf53d0fc8ffd2e4cc9126c3cfec203f139a18684661f4eec9e
BLAKE2b-256 checksum
How to use checksums
916ab05fb2c1d9ae7b94274d3f4ac305ddae8594093de9dfe7dbe6c7ce5bc359
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.5

Release history Release notifications | RSS feed

This release

2.1.4 This release

2 release files

2.1.3

2 release files

2.1.2

2 release files

2.1.1

2 release files

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