Skip to main content

Build Status

nitsm-python

Write code modules with the TestStand Semiconductor Module in python.

Note to End Users

This project is intended for use in automated device validation. Our primary focus is to provide a pythonic approach to automated testing with TestStand and TSM. More emphasis has been placed on simplicity and usability than execution time.

Python Version Support

nitsm supports python versions 3.6, 3.7, 3.8, 3.10, and 3.11. Newer versions of python might work, but it is not guaranteed. Python 2.7 is not supported.

Installation

pip install nitsm

nitsm requires NI TestStand 20.0 or higher and NI TestStand Semiconductor Module 20.0 or higher.

To use nitsm in conjunction with nimi-python, you must also install the appropriate NI instrument driver for each device you plan to use:

Visit the nimi-python project for information on which python packages to install alongside each instrument driver.

Usage

Define code modules with the code_module decorator in the nitsm.codemoduleapi module. When called from TestStand, the decorator will convert the pywin32 COM object into an nitsm.codemoduleapi.SemiconductorModuleContext object.

import nidcpower
import nitsm.codemoduleapi

@nitsm.codemoduleapi.code_module
def source_current(tsm_context, pins, current_level):
    pin_query_context, sessions, channel_strings = tsm_context.pins_to_nidcpower_sessions(pins)
    for session, channel_string in zip(sessions, channel_strings):
        session.channels[channel_string].output_function = nidcpower.OutputFunction.DC_CURRENT
        session.channels[channel_string].current_level = current_level
        session.channels[channel_string].initiate()

Known Limitations

  • Instrument alarms are currently not supported
  • The Set Relays TestStand step is not supported when creating relay sessions in python
  • See STATUS.md for additional information about the current state of the API and system tests

Release files for nitsm 0.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nitsm 0.2.2
File Size Uploaded
nitsm-0.2.2.tar.gz 42.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for nitsm 0.2.2
File Interpreter ABI Platform
nitsm-0.2.2-py3-none-any.whl Python 3 none any Details

Total release size: 75.6 kB

Release files / nitsm-0.2.2.tar.gz

Download URL nitsm-0.2.2.tar.gz
Size 42.0 kB
Tags Source
SHA-256 checksum
How to use checksums
4ebf512a92c9e5f4983ef067ac4ec87710a34c122b4a67845337dd08b01da177
BLAKE2b-256 checksum
How to use checksums
78ec943d697e5f202009c907777b101dfdfc84fd485f624862e95c9921775502
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 13, 2026.

Transparency log

Release files / nitsm-0.2.2-py3-none-any.whl

Download URL nitsm-0.2.2-py3-none-any.whl
Size 33.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e4a3daad76c411385cd68586a103734201a728512126579894810a4991af8210
BLAKE2b-256 checksum
How to use checksums
5719891ce9f1ae75c9f0d52af58240491a0f423bfe906b94e7772863915a9b66
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 13, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.2 This release

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page