The official Python SDK for Nylas — the infrastructure that powers communications. Integrate with Gmail, Microsoft, IMAP, Zoom, and 250+ email, calendar, and meeting providers in 5 minutes. Covers Email, Calendar, Contacts, Scheduler, Notetaker, and Agent Accounts.
This repository is for contributors and anyone installing the SDK from source. If you just want to use the SDK in your app, head straight to the on developer.nylas.com.
git clone https://github.com/nylas/nylas-python.git
cd nylas-python
pip install -e .
Runtime support
Tested on CPython 3.8+. Runs on standard servers as well as serverless platforms like AWS Lambda, Google Cloud Functions, and Vercel — install nylas like any other dependency in your deployment package.
⚡️ Usage
You access Nylas resources (messages, calendars, events, contacts, …) through an instance of Client. Initialize it with your API key — and optionally an api_uri matching your data residency.
import os
from nylas import Client
nylas = Client(
api_key=os.environ["NYLAS_API_KEY"],
api_uri=os.environ.get("NYLAS_API_URI", "https://api.us.nylas.com"),
timeout=30, # optional, in seconds
)
Once initialized, use it to make requests against a grant (an authenticated end-user account):
Resources expose a consistent CRUD surface — create(), find(), list(), update(), destroy() — plus resource-specific methods (e.g. messages.send(), events.send_rsvp()). Request and response models are dataclasses-json dataclasses, so every payload is fully type-hinted and supports to_dict() / from_dict().
Error handling
The SDK raises typed exceptions you can catch and inspect. Every API error carries a request_id and status_code — include both when filing a support ticket so we can trace the request end-to-end.
from nylas import Client
from nylas.models.errors import (
NylasApiError,
NylasOAuthError,
NylasSdkTimeoutError,
)
try:
nylas.calendars.list(identifier=grant_id)
except NylasApiError as err:
print(err.status_code, err.type, str(err), err.request_id)
except NylasOAuthError as err:
print(err.error, err.error_code, err.error_description)
except NylasSdkTimeoutError as err:
print("Timed out:", err.url, err.timeout)
For full sample apps and product quickstarts, browse nylas-samples on GitHub — every official SDK has Email, Calendar, Contacts, Scheduler, and Webhooks quickstarts.
🤖 AI agents
nylas/skills drops Nylas into Claude Code, Cursor, Codex, and other agents that support the skills format:
See CHANGELOG.md for per-release notes. Older upgrade guidance (v5.x → v6.x) lives in UPGRADE.md.
💙 Contributing
Issues, ideas, and pull requests welcome — see Contributing.md. Before opening a large change, please open an issue or post in the forum so we can sanity-check the direction.
Use together with nylas: extensions, drivers, servers and companion tools.
msalPythie’s Index: 90The Microsoft Authentication Library (MSAL) for Python library enables your app to access the Microsoft Cloud by supporting authentication of users with Microsoft Azure Active Directory accounts (AAD) and Microsoft Accounts (MSA) using industry standard OAuth2 and OpenID Connect.177.3M downloads/mo
myorbPythie’s Index: 71Personal AI-powered daily briefing dashboard that summarizes your email, calendar, tasks, finances and more.52.4K downloads/mo