Skip to main content

Leash platform SDK - access Gmail, Calendar, Drive and more from deployed apps

Project description

Leash SDK (Python)

Python SDK for accessing platform integrations (Gmail, Google Calendar, Google Drive) from apps deployed on Leash.

Install

pip install leash-sdk

Usage

from leash import LeashIntegrations

# Get the auth token from the leash-auth cookie (e.g. in Flask/Django)
integrations = LeashIntegrations(auth_token="your-jwt-token")

# Gmail
emails = integrations.gmail.list_messages(max_results=10)
integrations.gmail.send_message(to="user@example.com", subject="Hello", body="World")

# Calendar
events = integrations.calendar.list_events(time_min="2026-04-01T00:00:00Z")
integrations.calendar.create_event(
    summary="Meeting",
    start="2026-04-10T10:00:00Z",
    end="2026-04-10T11:00:00Z",
)

# Drive
files = integrations.drive.list_files(max_results=10)
integrations.drive.upload_file(name="notes.txt", content="hello", mime_type="text/plain")

How it works

The SDK calls the Leash platform proxy at https://api.leash.build/api/integrations/{provider}/{action}. The platform handles all OAuth token management -- the SDK just passes the user's auth token and makes typed API calls.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

leash_sdk-0.1.0.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

leash_sdk-0.1.0-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

Details for the file leash_sdk-0.1.0.tar.gz.

File metadata

  • Download URL: leash_sdk-0.1.0.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for leash_sdk-0.1.0.tar.gz
Algorithm Hash digest
SHA256 622d7efd38e29370e9c9974ff7cbf62071e7327d3793aff4be27e4ba9fb0df28
MD5 439b6ca46d317f5d8e53a24ff95473eb
BLAKE2b-256 4e17dd8024e416bc47953ce8deeaa65c8217ced7d0477b4d2c4fcfa5b332916e

See more details on using hashes here.

File details

Details for the file leash_sdk-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: leash_sdk-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for leash_sdk-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0d8f26d427949361c9450d41642b6c582ef4597c9997df33850847860c4670ca
MD5 c6b7184461621e4299bce9f4a7f05c73
BLAKE2b-256 3e487044eb98358d7423613707ae7871ec54e7bcab274fab755857696deadcb1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page