Metadata-Version: 2.4
Name: biqu-td1s
Version: 1.0.0
Summary: Python interface for BIQU TD1S filament measurements
Author: Jozef Mak
Maintainer: Jozef Mak
License-Expression: MIT
Project-URL: Homepage, https://github.com/j-mak/biqu-td1s
Project-URL: Repository, https://github.com/j-mak/biqu-td1s
Project-URL: Issues, https://github.com/j-mak/biqu-td1s/issues
Project-URL: Changelog, https://github.com/j-mak/biqu-td1s/blob/master/CHANGELOG.md
Keywords: biqu,td1s,filament,serial,3d-printing
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
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 :: System :: Hardware
Classifier: Typing :: Typed
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pyserial<4,>=3.5
Provides-Extra: dev
Requires-Dist: build<2,>=1; extra == "dev"
Requires-Dist: pytest<9,>=8; extra == "dev"
Requires-Dist: twine<7,>=6; extra == "dev"
Dynamic: license-file

# td1s

`td1s` discovers BIQU TD1S devices and reads filament TD and color
measurements over USB serial. It can be used as a Python library or as a
standalone command-line application.

## Installation

Install the `biqu-td1s` distribution from PyPI:

```shell
python -m pip install biqu-td1s
```

## Command-line usage

Both entry points expose the same options:

```shell
td1s-reader --once --timeout 30
python3 -m td1s --once --timeout 30
```

Use an explicit serial port when automatic discovery is not suitable:

```shell
td1s-reader --port COM10 --once --timeout 30
```

Output can be written as JSON Lines, emitted as the original TD1S measurement
line, appended to CSV, or supplemented with unrecognized control lines:

```shell
td1s-reader --json --csv measurements.csv
td1s-reader --raw --once
td1s-reader --show-control-lines
```

Run `td1s-reader --help` or `python -m td1s --help` for the complete argument
reference.

## Library usage

```python
from td1s import TD1SDevice, discover_devices

devices = discover_devices()
if not devices:
    raise RuntimeError("No BIQU TD1S device was found.")

with TD1SDevice(devices[0]) as device:
    measurement = device.read_measurement(timeout=30)

print(measurement.td, measurement.color, measurement.red)
```

The distribution name is `biqu-td1s`, while the import package remains
`td1s`. The public API includes `DeviceInfo`, `Measurement`, `TD1SDevice`,
`discover_devices`, and `parse_measurement`.

## Versioning

This project follows [Semantic Versioning](https://semver.org/). Incompatible
public API changes increment the major version, backward-compatible features
increment the minor version, and backward-compatible fixes increment the patch
version.
Notable changes are documented in the
[changelog](https://github.com/j-mak/biqu-td1s/blob/master/CHANGELOG.md).

## Development

```shell
python -m pip install -e ".[dev]"
python -m pytest
python -m build
python -m twine check dist/*
```

This project is an independent integration and is not affiliated with BIQU.

## License

This project is licensed under the MIT License. See `LICENSE` for details.
