Metadata-Version: 2.4
Name: askhinton
Version: 0.1.0
Summary: Official Python SDK for the AskHinton CRM API.
Author: AskHinton
License: Apache-2.0
Project-URL: Homepage, https://app.askhinton.com
Project-URL: Documentation, https://app.askhinton.com/api/docs
Keywords: askhinton,crm,sdk,api
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: httpx>=0.27

# askhinton

Official Python SDK for the [AskHinton CRM](https://app.askhinton.com) API.

```bash
pip install askhinton
```

## Quickstart

```python
from askhinton import AskHinton

ah = AskHinton(api_key="ahk_...")

# Single page
page = ah.companies.list(limit=25)
print(page.count, len(page.items), page.next_cursor)

# Auto-paginated iterator — handles cursors for you
for lead in ah.leads.iter():
    print(lead["companyName"])

# Create a record
new = ah.companies.create(name="Acme Corp", industry="SaaS")
print(new["id"])
```

Reads `ASKHINTON_KEY` from the environment when `api_key` isn't passed.

## What's covered

- `ah.companies` — `list`, `get`, `create`, `iter`, `contacts`, `iter_contacts`
- `ah.leads` — `list`, `get`, `create`, `iter`
- `ah.opportunities` — `list`, `get`, `iter` (`status="open" | "won" | "lost" | "all"`)
- `ah.activities` — `list`, `iter`
- `ah.tasks` — `list`, `get`, `iter` (`active_only=True|False`)
- `ah.pipelines` — `list`, `get`, `iter`

Every `iter()` paginates automatically with cursors — no manual `after`/`limit` bookkeeping.

## Errors

```python
from askhinton import AskHinton, AskHintonError
try:
    ah.companies.get("not-real")
except AskHintonError as e:
    print(e.status, e.body)
```

## License

Apache-2.0.
