# QHSE Tech SDKs

Official clients for the [QHSE Tech Public API](https://qhsetech.com/api-docs).

| Language | Package | Single-file | Runtime | Dependencies |
|---|---|---|---|---|
| TypeScript | [`@qhsetech/sdk`](https://www.npmjs.com/package/@qhsetech/sdk) | [`qhsetech.ts`](./qhsetech.ts) | Node 18+, Deno, Bun, browsers, edge | none |
| Python | [`qhsetech`](https://pypi.org/project/qhsetech/) | [`qhsetech.py`](./qhsetech.py) | Python 3.9+ | `requests` |

Both expose the same surface:

```
client.software.list(category="…", limit=10)   # GET /v1/software
client.software.get("tekmon")                   # GET /v1/software/:id
client.categories.list()                        # GET /v1/categories
client.reviews.list("tekmon")                   # GET /v1/reviews/:id
client.glossary.list(q="ISO")                   # GET /v1/glossary
client.search.products(q="incident reporting")  # GET /v1/search
```

## TypeScript quick start

```bash
npm install @qhsetech/sdk
```

```ts
import { QhseTechClient } from "@qhsetech/sdk";
const client = new QhseTechClient({ apiKey: process.env.QHSE_API_KEY! });
const { data } = await client.software.list({ limit: 10 });
```

Prefer zero-install? `curl -O https://qhsetech.com/api-docs/sdk/qhsetech.ts` and import locally.

## Python quick start

```bash
pip install qhsetech
```

```python
import os
from qhsetech import QhseTechClient
client = QhseTechClient(api_key=os.environ["QHSE_API_KEY"])
result = client.software.list(limit=10)
for p in result.data:
    print(p.name, p.rating)
```

Prefer zero-install? `curl -O https://qhsetech.com/api-docs/sdk/qhsetech.py` and `pip install requests`.

## Errors

Both SDKs raise/throw a typed `QhseTechApiError` with `status`, `code`, `request_id`, and (when relevant) `retry_after_seconds`.

## Releasing

See [`packages/RELEASING.md`](https://github.com/qhsetech/sdk/blob/main/packages/RELEASING.md) for the tag-triggered npm + PyPI publishing pipeline.

## License

MIT — fork freely.
