Metadata-Version: 2.4
Name: kleer-python
Version: 0.1.0
Summary: Python client for the Kleer (PE Accounting) API
Project-URL: Homepage, https://github.com/sdnit-se/kleer-python
Author-email: Daniel Nihlén <daniel.nihlen@sdnit.se>
License-Expression: MIT
License-File: LICENSE
Requires-Python: >=3.10
Requires-Dist: httpx>=0.27
Provides-Extra: dev
Requires-Dist: pytest>=8; extra == 'dev'
Requires-Dist: respx>=0.21; extra == 'dev'
Requires-Dist: ruff>=0.4; extra == 'dev'
Description-Content-Type: text/markdown

# kleer-python

Python client for the [Kleer (PE Accounting) API](https://api-doc.kleer.se/).

[Kleer](https://www.kleer.se/) (formerly PE Accounting) is a Swedish accounting and invoicing platform for businesses. This library provides a convenient Python interface to their REST API.

## Installation

```bash
pip install kleer-python
```

## Usage

```python
from kleer import KleerClient

kleer_client = KleerClient(token="your-api-token", company_id=12345)

# List clients
clients = kleer_client.clients.list()

# Get a specific client
c = kleer_client.clients.get(1)

# Create a client
new = kleer_client.clients.create({"name": "Acme Corp"})

# Update a client
kleer_client.clients.update(1, {"name": "Acme Inc"})

# Delete a client
kleer_client.clients.delete(1)
```

### Available resources

`companies`, `users`, `clients`, `suppliers`, `projects`, `client_projects`, `client_invoices`, `events`, `activities`, `expenses`, `dimensions`, `products`, `accounts`, `bank_accounts`, `bank_transactions`

## Development

```bash
pip install -e ".[dev]"
pytest
ruff check src/
```
