Registry / http-networking / rsinstrument

rsinstrument

JSON →
library1.124.0pypypi✓ verified 86d ago

RsInstrument is a Python communication module for Rohde & Schwarz instruments using VISA or socket connections. It provides a high-level API for SCPI command control, data transfer, and instrument discovery. Current version is 1.124.0, requiring Python >= 3.10. The library is actively maintained with regular releases.

pip install rsinstrument
INSTALL
IMPORT
SIG · RSINSTRUMENT
R
rsinstrument
http-networkingpythonv1.124.0
Install
1.8s avg
Import
329ms
Disk
19MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.124.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.352s · 20.9MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.8s · import 0.306s · 21MB
19MB installed
● package 19MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

RsInstrument
from RsInstrument import RsInstrument

Initialize an instrument connection and query its identification.

from RsInstrument import RsInstrument import os resource_string = os.environ.get('INSTR_RESOURCE', 'TCPIP::192.168.1.1::INSTR') instr = RsInstrument(resource_string) print(instr.query('*IDN?')) instr.close()
Debug
Known issues
breakingVersion 1.100.0 changed the default VISA backend from 'rs' to 'pyvisa-py'. Existing scripts using the old backend must specify it explicitly.
fix
Install pyvisa-py and set RsInstrument(resource, backend='pyvisa-py') or reinstall the legacy 'rs' backend.
affects: >=1.100.0
gotchaThe library is not thread-safe. Do not share an RsInstrument instance across threads without external locking.
fix
Use separate instrument instances per thread or implement proper mutex/lock.
affects: all
gotchaResource strings must strictly follow VISA Resource Regular Expression pattern. Incorrect strings cause immediate connection failure.
fix
Use format like 'TCPIP::192.168.1.1::INSTR' or 'USB::0x0AAD::0x0119::INSTR'. Validate with instr.utilities.check_resource_string()
affects: all
deprecatedThe method `instr.io.timeout` setter is deprecated in favor of `instr.visa_timeout`.
fix
Use `instr.visa_timeout = 5000` instead of `instr.io.timeout = 5000`.
affects: >=1.50.0
Errors
Common errors & fixes
AttributeError: module 'RsInstrument' has no attribute 'RsInstrument'
Incorrect import statement; typically `import RsInstrument` then trying to use RsInstrument.RsInstrument
fix
Use `from RsInstrument import RsInstrument` to import the class.
VisaIOError: VI_ERROR_TMO (-1073807339): Timeout expired before operation completed.
Timeout is too low or the instrument is not responding.
fix
Increase timeout: `instr.visa_timeout = 10000` (ms) or check instrument connection.
TypeError: __init__() got an unexpected keyword argument 'backend'
Using an older version of RsInstrument (<1.0) that doesn't accept the 'backend' parameter.
fix
Upgrade to latest version: `pip install --upgrade rsinstrument`
Upgrade
Version history
1.124.0latest on PyPI · released Feb 10, 2026
Audit
Dependencies
pyvisaoptionalRequired for VISA connectivity
pyvisa-pyoptionalVISA backend for RsInstrument
Agent activity
22 hits · last 30 days
node
14
OpenAI (training)
1
Resources
rsinstrument — pip install rsinstrument · libregistry