Metadata-Version: 2.4
Name: act365
Version: 1.7.1
Summary: Python Client for ACT365
Author: Simon McCartney
Author-email: simon@mccartney.ie
Requires-Python: >=3.11,<4.0
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Requires-Dist: click (==8.1.8)
Requires-Dist: httpx (==0.27.0)
Requires-Dist: json5 (==0.9.25)
Description-Content-Type: text/markdown

# ACT365

Minimal httpx based client for the [ACT365](https://www.act365.eu/) API.

API documentation: <https://act365api.docs.apiary.io/#>

Published on PyPI: <https://pypi.org/project/act365/>

## API Coverage

The ACT365 API is much larger than what this library currently binds. A summary
of the full API is kept in [docs/ACT365-API-Spec.md](docs/ACT365-API-Spec.md);
the tables below map that API surface to the Python bindings in `Act365Client` /
`Act365Auth` and the `act365` CLI.

### Covered

#### Authentication

| API | Binding | CLI |
| --- | --- | --- |
| `POST /api/account/login` | `Act365Auth` — automatic bearer-token login, re-login on 401, backoff on 429 | credentials via options or env vars |

#### Cardholders

| API | Binding | CLI |
| --- | --- | --- |
| List cardholders (`GET /api/cardholder`) | `Act365Client.getCardholders()` — paginated, supports `siteid`, `enabled`, `searchString` etc. filters | `act365 cardholders list` |
| Get cardholder by ID | `Act365Client.getCardholderById()` — client-side filter over the list endpoint, not the `GET /api/cardholder/{id}` endpoint | `act365 cardholders get --id` |
| Get cardholder by email | `Act365Client.getCardholderByEmail()` — client-side filter over the list endpoint | `act365 cardholders get --email` |
| Create cardholder (`POST /api/cardholder`) | `Act365Client.createCardholder()` | — |
| Update cardholder (`PUT /api/cardholder`) | `Act365Client.updateCardholder()` | — |

#### Event Bookings (bindings use `/api/*` endpoints; delete uses `/api2/*`)

| API | Binding | CLI |
| --- | --- | --- |
| List booking sites (`GET /api/Bookingsites`) | `Act365Client.getBookingSites()` | — |
| List doors on a site (`GET /api/Bookingdoors?siteid={siteid}`) | `Act365Client.getBookingSiteDoors()` | — |
| Create booking (`POST /api/Bookings`) | `Act365Client.createBooking()` | — |
| Get booking (`GET /api/Bookings?siteid={siteid}&bookingID={bookingid}`) | `Act365Client.getBooking()` | `act365 bookings get --id` |
| List bookings for a site (`GET /api/getbookings?siteid={siteid}&date={dd/MM/YYYY}`) | `Act365Client.getBookings()` | `act365 bookings list` |
| Delete booking (`DELETE /api2/Bookings?bookingID={bookingid}`) | `Act365Client.deleteBooking()` | `act365 bookings delete --id` / `--expired` |

`Act365Client` also exposes raw `post()` / `put()` / `delete()` passthroughs for
endpoints without dedicated bindings.

### Not Covered

No Python bindings exist yet for the following areas of the API:

- **Summary** — quick summary of customers/sites (`GET /api/summary`)
- **Customers** — list customers (`GET /api/customers`)
- **Sites** — list/get sites (`GET /api/sites`, `GET /api/sites/{siteid}`)
- **Site Lockdown** — activate / clear / command (`POST /api/lockdown/*`)
- **ACUs** — list, get, register, delete controllers (`/api/acus`)
- **Doors** — list, get, doors-for-cardholder, and door commands
  (Pass/Normalise/Lock/Unlock, single and bulk) (`/api/doors`)
- **Door Groups** — full CRUD (`/api/doorgroups`)
- **Cameras** — list cameras with live feed URLs (`GET /api/cameras`)
- **Reports / Events** — muster report, manual check-in/check-out, and all log
  event report variants (site, door, door group, cardholder, cardholder group,
  category, alarms) (`/api/events`)
- **Cardholders (remaining)** — get by external ID, delete, bulk create/delete,
  enable/disable (single and bulk), random PIN, switch site, and photo
  get/set/thumbnail
- **Cardholder Groups** — full CRUD (`/api/cardholdersgroups`)
- **Timezones** — full CRUD (`/api/timezones`)
- **WebHooks** — register, unregister, list (`/api/webhooks`)
- **Video Diagnostics** — segmenter and stream diagnostics (`/api/video/*`)
- **Event Bookings (remaining)** — update booking, bulk create, delete by
  filter, bulk delete by IDs
- **Booking Output Scheduling** — door output schedules (`POST /api2/Schedule`)
- **Localisation** — localised strings (`GET /api/localisation`)
- **Permissions** — current user access rights (`GET /api/permissions`)

