BenHW SDK - Python Interface
Python interface for Bentham Instruments Hardware Control DLL.
Installation
pip install benhw
Usage
Example
from benhw import BenHW, exceptions, tokens
hw = BenHW()
try:
hw.build_system_model("system.cfg")
hw.load_setup("setup.atr")
hw.initialise()
hw.park()
hw.select_wavelength(wl=555)
hw.set("motor1", tokens.MotorPosition, 0, 4455)
signal = hw.automeasure()
print(f"signal: {signal}")
except exceptions.BenHWException as e:
print(f"BenHW error: {e}")
Accessing Tokens and Errors
from benhw import tokens, errors
# Access tokens via namespace
print(tokens.ADCVolts) # 504
print(tokens.MonochromatorCurrentWL) # 11
# Access error codes via namespace
print(errors.BI_OK) # 0
print(errors.BI_error) # -1
Requirements
- Python 3.12+
- Windows operating system
License
Licensed under the MIT License (SPDX: MIT). Copyright (c) 2026 Bentham Instruments Ltd. SPDX-License-Identifier: MIT
See the LICENSE file included in this package. Third-party components are listed in THIRD_PARTY_NOTICES.txt.
Metadata
Release files for benhw 1.0.0
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 | Actions |
|---|---|---|---|---|
| benhw-1.0.0.tar.gz | 2.2 MB | Without provenance | Details for benhw-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| benhw-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for benhw-1.0.0-py3-none-any.whl |
Total release size: 4.4 MB
Release files / benhw-1.0.0.tar.gz
| Download URL | benhw-1.0.0.tar.gz |
|---|---|
| Size | 2.2 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ffc9e583d50c5f2b040888e3961b87cd2757b664f8f6048fa9404a44b8ddeecd
|
|
BLAKE2b-256 checksum How to use checksums |
04f583471b271e821c5a021a5c048eb8b30569d70a814b2b165a2b6c0b3270c5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / benhw-1.0.0-py3-none-any.whl
| Download URL | benhw-1.0.0-py3-none-any.whl |
|---|---|
| Size | 2.2 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4a4627087759a221c0227dd43f2274651ec09d63ccc9f4ce27f6fc0cbc091721
|
|
BLAKE2b-256 checksum How to use checksums |
41936512f525d9928a9a6b45908f0eec4d83c73b59d1dbeeef5b5d5ec07b6539
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Security for benhw 1.0.0
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A 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.