Skip to content

Releases: nylas/nylas-python

v6.4.0

24 Sep 17:51
Compare
Choose a tag to compare

Changelog

Added

  • Add support for from field for sending messages (#386)
  • Add missing schedule-specific fields to Message model (#385)
  • Add migration grant properties (#387)

Changed

  • Fix from field not being optional causing deserialization errors (#382)
  • Fix IMAP identifiers not encoding correctly (#383)
  • Fix NylasOAuthError not setting the status code properly (#388, #379)

v6.3.1

04 Sep 21:19
Compare
Choose a tag to compare

Changelog

Changed

  • Fix typo on Clean Messages (Fix typo on Clean Messages (#375)
  • Remove use of TestCommand (Remove use of TestCommand (#377)
  • Add Folder Webhooks (Add Folder Webhooks - Python SDK (#374)
  • Fix request session being reused across multiple requests (#380)

v6.3.0

05 Jun 16:56
Compare
Choose a tag to compare

Changelog

Added

  • Added Folder query param support (#371)
  • Added master_event_id field to events (#372)

Changed

  • Fixed issue with application models not being deserialized correctly (#371)

v6.2.0

17 May 18:24
Compare
Choose a tag to compare

Changelog

Added

  • Added support for custom headers field for drafts and messages (#360)
  • Added support for overriding various fields of outgoing requests (#363)
  • Added support for provider field in code exchange response (#360)
  • Added support for event_type filtering field for listing events (#364)
  • Added clean messages support (#361)
  • Added additional webhook triggers (#357)

Updated

  • Fixed issue where attachments < 3mb were not being encoded correctly (#362)
  • Fixed issue deserializing event and code exchange responses (#358, #368, #369)

v6.1.1

05 Mar 22:49
Compare
Choose a tag to compare

Changelog

Changed

  • Improved message sending and draft create/update performance (#352, #349)
  • Change default timeout to match API (90 seconds) (#353)

v6.1.0

27 Feb 22:46
Compare
Choose a tag to compare

Changelog

Added

  • Added support for round_to field in availability response (#348)
  • Added support for attributes field in folder model (#348)
  • Added support for icloud as an auth provider (#348)

Updated

  • Fixed webhook secret not returning on creation of webhook (#346)
  • Fixed issue with free busy and scheduled message responses not being deserialized correctly (#350)

Removed

  • Removed client_id from detect_provider() (#348)

v6.0.1

09 Feb 16:52
Compare
Choose a tag to compare

The first patch release fixes a handful of issues regarding auth and events.

Changelog

Updated

  • Fix deserialization error when getting token info or verifying access token (#342)
  • Fix schemas issue in the Event and CodeExchangeResponse models (#343, #344)

v6.0.0

09 Feb 14:28
d71acbe
Compare
Choose a tag to compare

The Nylas Python SDK v6.0.0 is out of beta now Generally Available! This SDK sees a number of changes, including breaking changes, and more importantly brings full support of the new Nylas API v3.

Changelog

Breaking Changes

  • Python SDK v6 supports the Nylas API v3 exclusively, dropping support for any endpoints that are not available in v3. See API v3 Features and Changes for more information.
  • Drop support for Python < v3.8.
  • Dropped the use of 'Collections' in favor of 'Resources'.
  • Removed all REST calls from models and moved them directly into resources.
  • Models no longer inherit from dict but instead either are a dataclass or inherit from TypedDict.
  • Renamed the SDK entrypoint from APIClient to Client.

Added

  • Created models for all API resources and endpoints, for all HTTP methods to reduce confusion on which fields are available for each endpoint.
  • Created error classes for the different API errors as well as SDK-specific errors.

Updated

  • Rewrote the majority of SDK to be more intuitive, explicit, and efficient.

Removed

  • Local Webhook development support is removed due to incompatibility with the new API version.

Docs and References

Please refer to the README.md for a quick description and getting started guide with the new SDK. Furthermore, we have an UPGRADE.md for instructions on upgrading from v5.x to v6.x, as well as a reference guide for the Python SDK.

v5.14.1

02 Aug 00:55
Compare
Choose a tag to compare

This release of the Nylas Python SDK brings a couple of fixes.

Release Notes

Fixed

  • Fix error when trying to iterate on list after calling count (#263)
  • Fix error when setting participant status on create event (#264)

New Contributors 🎉

v5.14.0

04 Apr 19:26
Compare
Choose a tag to compare

This release of the Nylas Python SDK brings a couple of new features.

Release Notes

Added

  • Added support for verifying webhook signatures (#257)
  • Added optional parameter for token-info endpoint (#256)

Verifying webhook signatures

from flask import Flask, request, jsonify
from nylas import APIClient, Webhook
import os
import json

app = Flask(__name__)
port = 9000
NYLAS_CLIENT_SECRET = os.environ.get("NYLAS_CLIENT_SECRET")

@app.route("/", methods=["POST"])
def webhook_callback():
    signature = request.headers.get("X-Nylas-Signature")
    request_data = json.dumps(request.get_json())
    
    if not Webhook.verify_webhook_signature(signature, request_data, NYLAS_CLIENT_SECRET):
        return jsonify({"error": "Invalid signature"}), 403

    body = request.json
    print("Webhook event received: ", json.dumps(body))

    return jsonify({"success": True}), 200

if __name__ == "__main__":
    app.run(port=port)