skillfed

PyVISA-sim

Simulated backend for PyVISA implementing TCPIP, GPIB, RS232, and USB resources

pyvisa-sim v0.7.1 188.1K downloads/30d#9,952 on PyPI88
Permissive 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) Active released

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-sim

uv

uv add pyvisa-sim

poetry

poetry add pyvisa-sim

Installing 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

Development Status :: 4 - BetaIntended Audience :: DevelopersIntended Audience :: Science/ResearchLicense :: OSI Approved :: MIT LicenseOperating System :: MacOS :: MacOS XOperating System :: Microsoft :: WindowsOperating System :: POSIX :: LinuxProgramming Language :: PythonProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Topic :: Scientific/Engineering :: Interface Engine/Protocol TranslatorTopic :: Software Development :: Libraries :: Python Modules

Tags

VISA simulatormock instrument backendGPIB USB serial simulationPyVISA testing without hardwareinstrument communication mockVISA protocol simulatormeasurement device emulation
instrument-simulationtesting-mockhardware-abstraction

More Python Modules packages