Metadata-Version: 2.5
Name: render-lab-tasks-gcal
Version: 0.1.0
Summary: gcal tasks for Render Workflows
Project-URL: Repository, https://github.com/render-lab/render-tasks-python
License-Expression: MIT
License-File: LICENSE
Requires-Python: >=3.12
Requires-Dist: httpx<0.29,>=0.28
Requires-Dist: render-lab-tasks-core<0.2,>=0.1.1
Requires-Dist: render==1.0.1
Description-Content-Type: text/markdown

# render-lab-tasks-gcal

Python port of all 9 registered tasks in the pinned TypeScript pack at
`45f9c2d44bd28e01ae9813e0d2ff56ee6c533816`. Python 3.12+.

Install this distribution and its dependencies:

```sh
pip install render-lab-tasks-gcal==0.1.0
```

Import definitions from `render_lab_tasks_gcal.tasks`; combine `app` objects
with `Workflows.from_workflows(...)`. JSON fields retain TS spelling; functions
use snake_case. Package root imports are inert.

## Tasks

| Registered name | Python export (also exposes `_impl`) |
| --- | --- |
| `gcal.createEvent` | `create_event` |
| `gcal.deleteEvent` | `delete_event` |
| `gcal.findFreeBusy` | `find_free_busy` |
| `gcal.getEvent` | `get_event` |
| `gcal.listEvents` | `list_events` |
| `gcal.quickAdd` | `quick_add` |
| `gcal.respond` | `respond` |
| `gcal.suggestTime` | `suggest_time` |
| `gcal.updateEvent` | `update_event` |

## Dependencies and retries

Raw implementations accept context first and keyword-only `deps`. The `.client`
module exports typed `Port`, `Deps`, and `Client` classes. Inject a fake port, or
pass a caller-owned `httpx.AsyncClient` to `Client`. Default dependencies close
their client after one operation. Credentials resolve at first use. Transport
retries are disabled; `retry.py` owns durable policies. DTO types are in `.types`.
Requires core >=0.1.1.

## Environment

| Variable | Contract |
| --- | --- |
| `GOOGLE_ACCESS_TOKEN` | Optional pre-issued token; takes precedence. |
| `GOOGLE_CLIENT_ID` | Required with secret and refresh token when no access token is supplied. |
| `GOOGLE_CLIENT_SECRET` | OAuth client secret for refresh. |
| `GOOGLE_REFRESH_TOKEN` | Refresh token granted the scopes for the operations you use. |
| `GCAL_CALENDAR_ID` | Optional default calendar; otherwise `primary`. |

## Verification and limitations

Calendar operations use the Google Calendar v3 API. listEvents returns one page.
suggestTime starts at the current instant, defaults to seven days, and reads at
most 250 events; it does not model business hours or exhaust pagination. It must
not be treated as an authoritative availability guarantee. freeBusy is a separate
operation. Writes use the inherited three-retry policy and may duplicate creates.
OAuth scopes and account permissions require live verification.

Shared fixtures execute the actual pinned TS implementations and compare Python
outputs and requests. Sanity's SDK calls are translated into separately asserted
REST requests. These are hermetic checks, not real account or hosted verification.
See [the testing backlog](https://github.com/render-lab/render-tasks-python/issues/1)
and the root verification tracker. Licensed under MIT.
