PyVISA-sim
Simulated backend for PyVISA implementing TCPIP, GPIB, RS232, and USB resources
What it is and what it does
PyVISA-sim is a backend plugin for PyVISA that replaces the need for the National Instruments VISA library and physical instruments with a software simulation. It implements most methods for Message Based communication over GPIB, USB, Serial, and Ethernet in a simulated environment, allowing you to develop and test instrument control code on any machine without hardware. The behavior of simulated devices is controlled by a plain text configuration file, making it easy to model different instrument responses.
The package has been actively maintained since 2015, supports Python 3.10 through 3.13, and integrates seamlessly with PyVISA's dynamic backend loading system. It's particularly useful for CI/CD pipelines, offline development, and testing measurement scripts before deploying them to real hardware.
Use it for:
- Test PyVISA measurement scripts in CI/CD pipelines without physical instruments or NI-VISA installed
- Develop and debug GPIB/USB/Serial instrument control code offline on any machine
- Mock instrument responses for unit testing measurement acquisition routines
- Prototype new measurement workflows before deploying to real laboratory hardware
- Train or demonstrate instrument control without requiring expensive test equipment
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
PyVISA-sim provides a simulated VISA backend for PyVISA that lets you test instrument communication code without physical devices or the National Instruments VISA library installed.
Yes. PyVISA-sim fills a genuine gap for developers working with VISA-based instrument control: it eliminates the friction of installing NI-VISA and acquiring hardware just to test code. The package is actively maintained, has no known vulnerabilities, carries a permissive MIT license, and installs with minimal friction. Install it if you work with PyVISA and need to test offline or in automated environments.
Install
pyvisa-sim on PyPI
pip
pip install pyvisa-simuv
uv add pyvisa-simpoetry
poetry add pyvisa-simInstalling PyVISA-sim
Before you install
Low friction: pure Python wheel with four straightforward runtime dependencies (pyvisa, PyYAML, stringparser, typing-extensions). Actively maintained with recent commits and no known vulnerabilities.
License in practice
MIT license permits free use, modification, and distribution with minimal restrictions—suitable for both open-source and commercial projects.
Quickstart
pip install pyvisa-sim
import pyvisa
rm = pyvisa.ResourceManager('@sim')
inst = rm.open_resource('GPIB0::1::INSTR')
response = inst.query('*IDN?')
Requires PyVISA 1.11+ and Python 3.10+; simulated device behavior must be configured via a plain text configuration file.
Verify before relying
- Extent of VISA method coverage beyond 'most of the methods' for Message Based communication
- Whether simulated device behavior configuration supports all GPIB/USB/Serial/Ethernet protocol variants
Package facts
| License | The MIT License Copyright (c) 2014 PyVISA-sim Authors and contributors. See AUTHORS Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated… (full text in the JSON record) (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 4 — pyvisa, PyYAML, stringparser, typing-extensions |
| Maintenance | actively maintained — 344 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 188,131/month — #9,952 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pyvisa_sim-0.7.1-py3-none-any.whl
Keywords: VISA, GPIB, USB, serial, RS232, measurement, acquisition, simulator, mock
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
PyVISA-pyPyVISA-py is a pure Python backend for the VISA…
permissive · top 5,000 on PyPI
RsInstrumentRsInstrument provides a Python interface for…
permissive · top 15,000 on PyPI
PyVISAPyVISA provides Python bindings to VISA…
permissive · top 5,000 on PyPI
snmpsimSNMP Simulator creates a pure-Python SNMP agent…
permissive · top 15,000 on PyPI
pyftdiPyFtdi provides a pure-Python user-space driver…
permissive · top 15,000 on PyPI
PySpicePySpice provides a Python interface to Ngspice…
copyleft · top 15,000 on PyPI
pyusbPyUSB provides Python access to USB devices on…
permissive · top 5,000 on PyPI
zhinst-toolkitzhinst-toolkit provides a high-level Python…
permissive · top 15,000 on PyPI
MultiPyVuMultiPyVu provides Python control over Quantum…
permissive · top 15,000 on PyPI
hidProvides Python bindings to the hidapi library…
permissive · top 15,000 on PyPI