View all files | ||||
The official Python SDK for Nylas — the infrastructure that powers communications
📖 SDK Guide · 📚 API Reference · 🚀 Sign up · 💡 Samples · 💬 Forum
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 Python SDK guide on developer.nylas.com.
You can also bootstrap from the terminal:
More options in the CLI getting-started guide.
Requirements: Python 3.8 or later.
To install from source:
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.
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.
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().
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.
Step-by-step walkthroughs in the SDK guide:
To inspect the raw HTTP traffic the SDK sends, turn on requests-level logging:
Runnable examples live in examples/ — including send email, inline attachments, folders, import events, Notetaker API, Notetaker calendar, message fields, metadata fields, provider errors, response headers, select parameter, special characters, hidden folders, and plain text.
For full sample apps and product quickstarts, browse nylas-samples on GitHub — every official SDK has Email, Calendar, Contacts, Scheduler, and Webhooks quickstarts.
nylas/skills drops Nylas into Claude Code, Cursor, Codex, and other agents that support the skills format:
The CLI also installs an MCP server for Claude Desktop, Claude Code, Cursor, Windsurf, or VS Code:
Walkthrough: give AI agents email access via MCP.
See CHANGELOG.md for per-release notes. Older upgrade guidance (v5.x → v6.x) lives in UPGRADE.md.
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.
Found a vulnerability? Please don't open a public issue. Report it through our Vulnerability Disclosure Policy.
MIT — see LICENSE.