Metadata-Version: 2.4
Name: klein-colorimeter-sdk
Version: 0.1.0
Summary: Pure Python SDK for Klein colorimeters derived from the Klein SDK 2.75 API surface.
Author: shoverbj
License-Expression: MIT
Project-URL: Homepage, https://github.com/shoverbj/kleinPy
Project-URL: Repository, https://github.com/shoverbj/kleinPy
Project-URL: Issues, https://github.com/shoverbj/kleinPy/issues
Keywords: colorimeter,klein,display-calibration,serial,instrumentation
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pyserial>=3.5
Provides-Extra: dev
Requires-Dist: build>=1.2.0; extra == "dev"
Requires-Dist: twine>=5.1.0; extra == "dev"
Dynamic: license-file

# Klein Colorimeter Python SDK

This workspace now includes a pure Python SDK package, `klein_colorimeter`, that mirrors the public surface of the Klein `KClmtr` SDK and talks to the meter over the same serial protocol.

## Install

```powershell
python -m pip install -e .
```

## Examples

```python
from klein_colorimeter import KClmtr

meter = KClmtr()
if meter.connect("COM3"):
    measurement = meter.getNextMeasurement()
    print(measurement.getBigY(), measurement.getCIE1931_x(), measurement.getCIE1931_y())
    meter.closePort()
```

Translated sample scripts are in `examples/python/`:

- `connect_and_measure.py` for a single measurement after connecting.
- `continuous_measure_callback.py` for continuous measurements using the callback/inheritance pattern from the original SDK.
- `single_flicker.py` for a one-shot flicker capture.
- `continuous_flicker_callback.py` for continuous flicker reporting.
- `counts_once.py` for raw counts and thermal values.
- `calfiles.py` for listing and selecting calibration profiles.

## Notes

- The package is pure Python. `pyserial` is required for live device access, and `numpy` is used when available for faster math paths.
- The API names intentionally track the original SDK so existing examples can be translated with minimal changes.
- Derived-work copyright and permission notice from the original Klein SDK source is included in [LICENSE](LICENSE).

## PyPI Release

Release instructions for building and publishing are in [PUBLISHING.md](PUBLISHING.md).
