skillfed

RsInstrument

VISA or Socket Communication Module for Rohde & Schwarz Instruments

rsinstrument v1.126.0 117.6K downloads/30d#12,158 on PyPI157
Permissive license MIT Active released

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 rsinstrument

uv

uv add rsinstrument

poetry

poetry add rsinstrument

Installing 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

Development Status :: 5 - Production/StableIntended Audience :: DevelopersProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Scientific/Engineering :: Instrument Drivers

Tags

VISA instrument communicationrohde schwarz instrument controlSCPI command interfacetest equipment remote controlinstrument driver pythonlaboratory instrument automationTCPIP socket instrument
instrument-drivervisa-scpilab-automation

More Scientific/Engineering packages

numpy

NumPy provides an N-dimensional array object…

permissive · top 100 on PyPI

pandas

pandas provides fast, flexible data structures…

permissive · top 100 on PyPI

scipy

scipy provides numerical algorithms for…

permissive · top 100 on PyPI

scikit-learn

scikit-learn provides a comprehensive Python…

permissive · top 1,000 on PyPI

dill

dill extends Python's pickle module to…

permissive · top 1,000 on PyPI

multiprocess

Multiprocess is an enhanced fork of Python's…

permissive · top 1,000 on PyPI

PyVISA-sim

PyVISA-sim provides a simulated VISA backend…

permissive · top 15,000 on PyPI

PyVISA

PyVISA provides Python bindings to VISA…

permissive · top 5,000 on PyPI

zhinst-toolkit

zhinst-toolkit provides a high-level Python…

permissive · top 15,000 on PyPI

PyVISA-py

PyVISA-py is a pure Python backend for the VISA…

permissive · top 5,000 on PyPI

zhinst-core

zhinst-core provides a native Python API for…

permissive · top 15,000 on PyPI

zhinst-comms

zhinst-comms provides protocol stack bindings…

permissive · top 15,000 on PyPI

opentelemetry-instrumentation-agno

Automatically instruments the Agno framework to…

permissive · top 5,000 on PyPI

openinference-instrumentation-portkey

Automatically instruments Portkey AI API calls…

permissive · top 15,000 on PyPI

zhinst-utils

Provides helper functions and device-specific…

permissive · top 15,000 on PyPI

opentelemetry-instrumentation-lancedb

Adds distributed tracing instrumentation for…

permissive · top 5,000 on PyPI