Skip to main content

PyPI License: MIT Python 3.10+

gcal-sdk

A clean, typed Python SDK for the Google Calendar API v3. Built on top of google-api-python-client with Pydantic v2 models.

Installation

pip install gcal-sdk

Authentication

The SDK loads OAuth credentials from default paths:

  • ~/secrets/google-oauth/credentials.json — OAuth client credentials
  • ~/secrets/google-oauth/token.json — refresh token + access token

These paths can be overridden when creating the client.

Usage

from datetime import datetime, timezone, timedelta
from gcal_sdk import GCalClient

client = GCalClient()

# List upcoming events
events = client.events.list("primary", time_min=datetime.now(timezone.utc))
for event in events:
    print(f"{event.summary} — {event.start}")

# Create an event
start = datetime.now(timezone.utc) + timedelta(hours=1)
end = start + timedelta(hours=1)
new_event = client.events.create(
    "primary",
    summary="Team meeting",
    start=start,
    end=end,
)
print(f"Created: {new_event.html_link}")

# Update an event
updated = client.events.patch(
    "primary",
    event_id=new_event.id,
    summary="Updated team meeting",
)

# Delete an event
client.events.delete("primary", event_id=new_event.id)

# List calendars
calendars = client.calendars.list()
for cal in calendars:
    print(f"{cal.summary} (primary={cal.primary})")

# Get primary calendar
primary = client.calendars.get("primary")

# Check free/busy
busy = client.freebusy.query(
    calendar_ids=["primary"],
    time_min=datetime.now(timezone.utc),
    time_max=datetime.now(timezone.utc) + timedelta(days=1),
)

Development

# Install in dev mode
pip install -e ".[dev]"

# Run tests (requires valid OAuth tokens)
pytest

License

MIT

Metadata

Release files for gcal-sdk-ldraney 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gcal-sdk-ldraney 0.1.1
File Size Uploaded
gcal_sdk_ldraney-0.1.1.tar.gz 11.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for gcal-sdk-ldraney 0.1.1
File Interpreter ABI Platform
gcal_sdk_ldraney-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 24.6 kB

Release files / gcal_sdk_ldraney-0.1.1.tar.gz

Download URL gcal_sdk_ldraney-0.1.1.tar.gz
Size 11.9 kB
Tags Source
SHA-256 checksum
How to use checksums
35faac026f96c7f3385946e348d703a2408701382ebb417093303381afcfe949
BLAKE2b-256 checksum
How to use checksums
3c827f55ffcb2431257f13aa31a473fecbbb96aed269c21b779437a7ddc77f89
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 16, 2026.

Transparency log

Release files / gcal_sdk_ldraney-0.1.1-py3-none-any.whl

Download URL gcal_sdk_ldraney-0.1.1-py3-none-any.whl
Size 12.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
663cc70d378a4b7f400a0060adcd6ce8468f792a7964d238fbb25211f64d234d
BLAKE2b-256 checksum
How to use checksums
83d8c8fdf73f4ab673c808ac45a9eebf51d3dcfe49fb644fa9b77f43a2dfde24
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 16, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page