Open source developers and National Instruments have made Python integration with NI hardware easy by creating modules that abstract the lower-level ctypes function calls into simplified APIs. The following links lead to documentation resources for Python wrappers that have been created for NI hardware drivers.
Python APIs for PXI Modular Instruments
The nimi-python repository is a collection of Python modules that provide an interface to the underlying NI modular instrument drivers. Currently, NI offers Python support through this package for PXI oscilloscopes, waveform generators, DMMs, SMUs, power supplies, switches, and digital pattern instruments. These instruments use the following drivers:
Learn more about nimi-python
Python API for DAQ Hardware
The nidaqmx package contains an API for interacting with the NI-DAQmx driver required to communicate your NI data acquisition (DAQ) device. This package was created and is supported by NI. The package is implemented as a complex, highly object-oriented wrapper around the NI-DAQmx C API using the ctypes Python library.
Python API for VirtualBench
The pyVirtualBench library provides an interface to the underlying VirtualBench driver by wrapping the C API.
Note: pyVirtualBench is a third-party wrapper and is not directly supported by NI.
Python API for RIO Hardware
The National Instruments FPGA Interface Python API is used for communication between processor and FPGA within NI reconfigurable I/O (RIO) hardware such as NI CompactRIO, NI Single-Board RIO, NI FlexRIO, and NI R Series multifunction RIO.
With the FPGA Interface Python API, developers can use LabVIEW FPGA to program the FPGA within NI hardware and communicate to it from Python running on a host computer. This gives engineers and scientists with Python expertise the ability to take advantage of compiled LabVIEW FPGA bitfiles and have the option to reuse existing Python code.
Learn more about FPGA Interface Python API
Python API for Vision Applications
The nivision library is a National Instruments image/vision processing library that makes the functionality of NI Vision available in the Python programming language. It is available for multiple platforms including Windows and the CompactRIO.
Note: nivision is a third-party wrapper and is not directly supported by NI.
Learn more about nivision
Python API for CAN, LIN, and FlexRay Hardware
The nixnet package contains an API for interacting with the NI-XNET driver. NI-XNET is the driver software technology behind NI-XNET CAN, LIN, and FlexRay PCI, PXI, and NI C Series interfaces. The nixnet package and NI-XNET are supported by NI.
Learn more about nixnet
Python API for Traditional, Benchtop Instruments
PyVISA is a Python package that contains the API for interacting with the NI-VISA driver. NI-VISA enables you to control measurement instruments independently of the interface (e.g. GPIB, RS232, USB, Ethernet) and is the driver software technology behind NI serial, GPIB, and Ethernet PCI, PXI, USB, and NI C Series interfaces.
Note: PyVISA is a third-party wrapper and is not directly supported by NI.
Learn more about PyVISA