Releases: nylas/nylas-python
Releases · nylas/nylas-python
v6.4.0
v6.3.1
v6.3.0
v6.2.0
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
v6.1.1
v6.1.0
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
fromdetect_provider()
(#348)
v6.0.1
v6.0.0
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 adataclass
or inherit fromTypedDict
. - Renamed the SDK entrypoint from
APIClient
toClient
.
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
v5.14.0
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)