spektralwerk_scpi_client
spektralwerk_scpi_client is a Python library for communicating with Spektralwerk NIR spectrometers via their SCPI interface.
The library supports all available configuration settings as well as the retrieval of spectral data.
The API supports two ways of obtaining spectra:
- single spectrum mode: returns a single spectrum upon request. Intended for use cases like exploratory spectroscopy in the lab or requests triggered by the trigger in interface
- streaming streaming mode: returns a continuous stream of spectral information. Intended for process analytics, in-line spectrometry in production and other situations demanding very high sample rates.
Supported Devices
- Spektralwerk Core
- set/get exposure time
- set/get average number
- set/get offset voltage
- set/get light and dark reference spectrum
- get pixel count and wavelengths array of the spectrometer
- get single/averaged raw spectrum and continuous emisison of spectra
- configuration of processing steps
- set/get output format of the Spektralwerk Core
- set/get the number of emitted spectra
- set/get region-of-interest
- set/get binning width
Requirements
- Python3
- hatch for development (e.g.
pipx install hatch) - bump-my-version for semantic verioning
Usage
spektralwerk-scpi-client is available via PyPI. To install spektralwerk-scpi-client use pip:
pip install spektralwerk-scpi-client
Example Usage
An example can be found in the examples directory.
export SCPI_HOST="<hostname or IP>"
export SCPI_PORT="<port number>"
hatch run examples:spw_core_demo
Development
bump-my-version for increasing version of spektralwerk-scpi-client.
The configuration of bump-my-version is located in .bumpversion.toml and pyproject.toml.
To increase the version these commands can be used:
# Create a new release.
hatch run version {major|minor|patch}
License
spektralwerk_scpi_client is distributed under the terms of the MIT license.
Metadata
Release files for spektralwerk-scpi-client 0.5.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| spektralwerk_scpi_client-0.5.1.tar.gz | 12.1 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| spektralwerk_scpi_client-0.5.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 27.4 kB
Release files / spektralwerk_scpi_client-0.5.1.tar.gz
| Download URL | spektralwerk_scpi_client-0.5.1.tar.gz |
|---|---|
| Size | 12.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
20af840ec823edbcb8b27620e7e23c911baf42e554a9653653bc84414773222c
|
|
BLAKE2b-256 checksum How to use checksums |
fbe094e1415236388d5aa44d127d35562077a5664924adabcbe3429d5abbb61d
|
| 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 7, 2026.
Transparency logRelease files / spektralwerk_scpi_client-0.5.1-py3-none-any.whl
| Download URL | spektralwerk_scpi_client-0.5.1-py3-none-any.whl |
|---|---|
| Size | 15.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a80add183daf218ca8da1317c42b630ba06347d4154087c58382a909a63a2462
|
|
BLAKE2b-256 checksum How to use checksums |
32654a96e7b559ab62197ce953c16a64f3df638384cf5fd5e875be76e3f00b5e
|
| 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 7, 2026.
Transparency logSecurity for spektralwerk-scpi-client 0.5.1
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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for spektralwerk_scpi_client-0.5.1.tar.gz
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 7, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.