Metadata-Version: 2.5
Name: pybiotime
Version: 0.1.0
Summary: Unofficial typed Python client for the ZKTeco BioTime REST API.
Project-URL: Documentation, https://malikzu.github.io/pybiotime/
Project-URL: Source, https://github.com/MalikZu/pybiotime
Project-URL: Issues, https://github.com/MalikZu/pybiotime/issues
License-Expression: MIT
License-File: LICENSE
Keywords: api-client,attendance,biometric,biotime,time-attendance,zkteco
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
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: Programming Language :: Python :: 3.14
Classifier: Typing :: Typed
Requires-Python: >=3.10
Requires-Dist: httpx<1,>=0.27
Requires-Dist: pydantic<3,>=2.6
Requires-Dist: tzdata>=2023.3; sys_platform == 'win32'
Description-Content-Type: text/markdown

# pybiotime

Typed Python client for the ZKTeco BioTime REST API.

> **Status: alpha.** The interface may change before 1.0.
>
> pybiotime is an unofficial project. It is not affiliated with or endorsed by ZKTeco.

```bash
pip install pybiotime
```

```python
from pybiotime import BioTimeClient, TokenAuth

with BioTimeClient("http://10.0.0.5:8090", auth=TokenAuth("api_user", "secret")) as bt:
    for punch in bt.transactions.list(emp_code="1001"):
        print(punch.punch_time, punch.punch_state)
```

Documentation: https://malikzu.github.io/pybiotime/

## What it does

- Talks to BioTime 9.5, 9.0, 8.5 and 8.0 with the same models. Only 9.5 is tested
  against a live server so far.
- Sync and async clients with the same methods.
- Devices, punch transactions, employees, departments, areas, positions and resignations.
- Reads new punches without losing late uploads from offline devices.
- Automatic pagination, typed models and clear errors.
- An in-memory fake server for testing code that uses pybiotime.
- A `pybiotime` command for exports and scheduled punch collection.
- Python 3.10 to 3.14. Depends only on `httpx` and `pydantic` (plus `tzdata` on Windows).

## Contributing

See [docs/contributing.md](docs/contributing.md).

## License

MIT
