RsInstrument
VISA or Socket Communication Module for Rohde & Schwarz Instruments
What it is and what it does
RsInstrument is a Python library that wraps VISA communication to simplify remote control of Rohde & Schwarz test instruments. It abstracts the low-level SCPI protocol details, allowing developers to send commands and parse responses from oscilloscopes, spectrum analyzers, power supplies, and other R&S equipment over network or local connections. The library handles connection setup, error checking, logging, and data type conversion.
Typical use involves instantiating an instrument object with a VISA resource string, then calling methods like query_str() to send SCPI queries and retrieve responses. It supports context managers for error suppression, SCPI logging for debugging, and utility methods for common operations like option checking and data parsing. The package is actively maintained and supports modern Python versions (3.10–3.14).
Use it for:
- Automate test sequences on R&S oscilloscopes or spectrum analyzers from a Python script
- Log and debug SCPI communication to troubleshoot instrument control issues
- Build a measurement application that queries multiple R&S instruments and aggregates results
- Integrate R&S power supplies or sensors into a larger lab automation framework
- Suppress and handle instrument errors gracefully within specific code blocks
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
RsInstrument provides a Python interface for communicating with Rohde & Schwarz test instruments over VISA (TCPIP, USB, GPIB) or socket connections, handling SCPI command queries and responses.
Yes. RsInstrument is actively maintained, has no known vulnerabilities, low install friction, and a permissive MIT license. Install it if you need to control Rohde & Schwarz instruments from Python. The only gotcha is the Python 3.10+ requirement; if you're on an older version, you cannot use this package.
Install
rsinstrument on PyPI
pip
pip install rsinstrumentuv
uv add rsinstrumentpoetry
poetry add rsinstrumentInstalling RsInstrument
Before you install
Low friction install with only two runtime dependencies (pyvisa and typing-extensions). Actively maintained with recent releases; last commit 2026-06-01 and version released 2026-07-21. Requires Python 3.10 or later.
License in practice
MIT license is permissive, allowing use in commercial and open-source projects with minimal restrictions beyond attribution.
Quickstart
pip install rsinstrument
from RsInstrument import RsInstrument
instr = RsInstrument('TCPIP::192.168.56.101::hislip0', id_query=True, reset=True)
idn = instr.query_str('*IDN?')
print('Hello, I am: ' + idn)
Requires Python 3.10 or later; target instrument must be reachable via VISA transport (TCPIP, USB, GPIB, or socket).
Verify before relying
- Whether pyvisa-sim backend is fully compatible with all RsInstrument features beyond the fix noted in version 1.125.0.124
- Extent of MCP server functionality and whether it requires additional dependencies beyond the base install
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — pyvisa, typing-extensions |
| Maintenance | actively maintained — 24 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 117,558/month — #12,158 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: rsinstrument-1.126.0-py3-none-any.whl
Keywords: RsInstrument, VISA, RohdeSchwarz
Tags
More Scientific/Engineering packages
NumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
pandaspandas provides fast, flexible data structures…
permissive · top 100 on PyPI
scipyscipy provides numerical algorithms for…
permissive · top 100 on PyPI
scikit-learnscikit-learn provides a comprehensive Python…
permissive · top 1,000 on PyPI
dilldill extends Python's pickle module to…
permissive · top 1,000 on PyPI
multiprocessMultiprocess is an enhanced fork of Python's…
permissive · top 1,000 on PyPI
PyVISA-simPyVISA-sim provides a simulated VISA backend…
permissive · top 15,000 on PyPI
PyVISAPyVISA provides Python bindings to VISA…
permissive · top 5,000 on PyPI
zhinst-toolkitzhinst-toolkit provides a high-level Python…
permissive · top 15,000 on PyPI
PyVISA-pyPyVISA-py is a pure Python backend for the VISA…
permissive · top 5,000 on PyPI
zhinst-corezhinst-core provides a native Python API for…
permissive · top 15,000 on PyPI
zhinst-commszhinst-comms provides protocol stack bindings…
permissive · top 15,000 on PyPI
opentelemetry-instrumentation-agnoAutomatically instruments the Agno framework to…
permissive · top 5,000 on PyPI
openinference-instrumentation-portkeyAutomatically instruments Portkey AI API calls…
permissive · top 15,000 on PyPI
zhinst-utilsProvides helper functions and device-specific…
permissive · top 15,000 on PyPI
opentelemetry-instrumentation-lancedbAdds distributed tracing instrumentation for…
permissive · top 5,000 on PyPI