- UAS multi-credential update
- Added
specific_time_availabilityfield toAvailabilityParticipantfor overriding open hours on specific dates - Added
smtp_requiredoption to hosted authentication config to require users to enter SMTP settings during IMAP authentication
- Fix UTF-8 encoding for special characters (emoji, accented letters, etc.) by encoding JSON as UTF-8 bytes
- Fix attachment id to not be a requirement
- Added
message.deletedto the Webhook enum, appended tests - Fixed Participant.email not being optional, Microsoft events can now be represented
- Clarified UTF-8 encoding behavior: ASCII characters are preserved as-is (not escaped) while non-ASCII characters are preserved as UTF-8 in JSON payloads
- Added support for metadata_pair query params to the messages and drafts list endpoints
- Fixed UTF-8 character encoding for all API requests to preserve special characters (accented letters, emoji, etc.) instead of escaping them as unicode sequences
- Fixed from field handling in messages.send() to properly map "from_" field to "from field
- Fixed content_id handling for large inline attachments to use content_id as field name instead of generic file{index}
- Added Yahoo, Zoom, EWS as providers to models/auth.py
- Fixed grants.update() not using the correct "PATCH" method
- Added support for
is_plaintextproperty in messages send and drafts create endpoints
- Fixed KeyError when processing events with empty or incomplete conferencing objects
- Added
unknownto ConferencingProvider
- Added support for
single_levelquery parameter inListFolderQueryParamsfor Microsoft accounts to control folder hierarchy traversal - Added support for
earliest_message_datequery parameter for threads - Fixed
earliest_message_datenot being an optional response field - Added support for new message fields query parameter values:
include_tracking_optionsandraw_mime - Added
tracking_optionsfield to Message model for message tracking settings - Added
raw_mimefield to Message model for Base64url-encoded message data - Added TrackingOptions model for message tracking configuration
- Maintained backwards compatibility for existing message functionality
- Added support for
include_hidden_foldersquery parameter for listing folders (Microsoft only)
- Added support for for tentative_as_busy parameter to the availability request
- Added missing webhook triggers
- Added support for Notetaker APIs
- Added support for Notetaker via the calendar and event APIs
- Added support for
list_import_events
- Added support for
selectquery parameter in list calendars, list events, and list messages.
- Added response headers to all responses from the Nylas API
- Added support for Scheduler APIs
- Added metadata field support for drafts and messages through CreateDraftRequest and Message model
- Fixed attachment download response handling
- Added support for from field for sending messages
- Added missing schedule-specific fields to Message model
- Added migration grant properties
- Fixed from field not being optional causing deserialization errors
- Fixed IMAP identifiers not encoding correctly
- Fixed NylasOAuthError not setting the status code properly
- Fixed typo on Clean Messages
- Fixed request session being reused across multiple requests
- Added Folder Webhooks
- Removed use of TestCommand
- Added Folder query param support
- Added
master_event_idfield to events - Fixed issue with application models not being deserialized correctly
- Added support for custom headers field for drafts and messages
- Added support for overriding various fields of outgoing requests
- Added support for
providerfield in code exchange response - Added support for
event_typefiltering field for listing events - Added clean messages support
- Added additional webhook triggers
- Fixed issue where attachments < 3mb were not being encoded correctly
- Fixed issue deserializing event and code exchange responses
- Improved message sending and draft create/update performance
- Change default timeout to match API (90 seconds)
- Added support for
round_tofield in availability response - Added support for
attributesfield in folder model - Added support for icloud as an auth provider
- Fixed webhook secret not returning on creation of webhook
- Fixed issue with free busy and scheduled message responses not being deserialized correctly
- Removed
client_idfromdetect_provider()
- Fix deserialization error when getting token info or verifying access token
- Fix schemas issue in the
EventandCodeExchangeResponsemodels
- BREAKING CHANGE: Python SDK v6 supports the Nylas API v3 exclusively, dropping support for any endpoints that are not available in v3
- BREAKING CHANGE: Drop support for Python < v3.8
- BREAKING CHANGE: Dropped the use of 'Collections' in favor of 'Resources'
- BREAKING CHANGE: Removed all REST calls from models and moved them directly into resources
- BREAKING CHANGE: Models no longer inherit from
dictbut instead either are adataclassor inherit fromTypedDict - BREAKING CHANGE: Renamed the SDK entrypoint from
APIClienttoClient - REMOVED: Local Webhook development support is removed due to incompatibility
- Rewritten the majority of SDK to be more intuitive, explicit, and efficient
- 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
- Fix error when trying to iterate on list after calling count
- Fix error when setting participant status on create event
- Add support for
viewparameter inThreads.search()
- Fix error when trying to iterate on list after calling count
- Fix error when setting participant status on create event
- Add support for verifying webhook signatures
- Add optional parameter for token-info endpoint
- Fix
send_authorizationnot returning the correct dict - Fix expanded threads not inflating the messages objects properly
- Fix class attributes with leading underscores not serializing as expected
- Add local webhook development support
- Use PEP508 syntax for conditional dependencies
- Only install enum34 on python34 and below
- Add support for sending raw MIME messages
- Add support for calendar colors (for Microsoft calendars)
- Add support for rate limit errors
- Add support for visibility field in Event
- Update package setup to be compatible with PEP 517
- Fix authentication for integrations
- Add
metadatafield toJobStatus - Add missing hosted authentication parameters
- Add support for
calendarfield in free-busy, availability, and consecutive availability queries
- Add
enforce_read_onlyparameter to overridingas_jsonfunctions
- Add option to include read only params in
as_json - Change config file in
hosted-oauthexample to match new Flask rules - Fix unauthorized error for
revoke_token
- Add support for collective and group events
- Add support for getting the number of queried objects (count view)
- Improve usage of read only fields in models
- Fix Calendar availability functions not using the correct authentication method
- Add Outbox support
- Add support for new (beta) Integrations authentication (Integrations API, Grants API, Hosted Authentication for Integrations)
- Add support for
limitandoffsetfor message/thread search - Add
authentication_typefield toAccount - Enable Nylas API v2.5 support
- Fix
Draftnot sending metadata
- Add Delta support
- Add Webhook support
- Omit
Nonevalues from resultingas_json()object - Enable Nylas API v2.4 support
- Add validation for
send_authorization - Fix
native-authentication-gmailexample app
- Add support for
Eventto ICS - Enable full payload response for exchanging the token for code
- Add missing
sourcefield inContactclass
- Fix issue where keyword arguments calling
_update_resourcewere not correctly resolving to URL params - Improved support for Application Details
- Add job status support
- Add
is_primaryfield to Calendar - Fix bug where updating an Event results in an API error
- Add support for Scheduler API
- Add support for Event notifications
- Add support for Component CRUD
- Add metadata support for
Calendar,MessageandAccount - Improve error details returned from the API
- Add support for calendar consecutive availability
- Add dynamic conferencing link creation support
- Add Event conferencing support
- Add filtering of "None" value attributes before making requests
- Fix
categorized_attype to beepochinNeuralCategorizer
- Transitioned from
app_idandapp_secretnaming toclient_idandclient_secret - Add support for the Nylas Neural API
- Add
metadatafield in the Event model to support new event metadata feature - Add new Room Resource fields
- Add
Nylas-API-Versionheader support - Fix adding a tracking object to an existing
draft - Fix issue when converting offset-aware
datetimeobjects totimestamp - Fix
limitvalue in filter not being used when making.all()call - Fix
from_field set by attribute on draft ignored - Remove
bumpversionfrom a required dependency to an extra dependency
- Bugfix: Previously, if you passed a timedelta to the calendar availability API endpoint, it was converted to a float. Now, it is coerced to an int.
- Add calendar availability information, available at
/calendars/availabilityAPI endpoint
- Bugfix: Previously, if you specified a limit of 50 or more for any resource, you would receive ALL the resources available on the server. The SDK now properly respects the limit provided.
- Add
has_attachmentsto Thread model
- Add
ical_uidto Event model, only available on API version 2.1 or above. See https://headwayapp.co/nylas-changelog/icaluid-support-132816 - Add RoomResource model, available at
/resourcesAPI endpoint - Add free/busy information, available at
/calendars/free-busyAPI endpoint
- Add
providerto Account model - Add
reply_toto Message model - Add
Event.rsvp()method
- Bugfix:
/token-infoendpoint
- Add support for
/token-infoendpoint, which allows you to query the available scopes and validity of a given access token for an account. - Add message.from_ alias
- Bugfix: contact.email_addresses renamed to contact.emails
- Add support for
/ip_addressesendpoint.
- You can now pass a list of
scopeswhen callingAPIClient.authentication_url()in order to enable selective sync. Previously, we only setscope=emailby default; now, the default is to use all scopes. - Add X-Nylas-Client-Id header for HTTP requests
- Add support for
revoke-allendpoint.
- Raise
UnsyncedErrorwhen a message isn't ready to be retrieved yet (HTTP 202) when fetching a raw message.
- The Nylas Python SDK now fully supports both Python 2.7 and Python 3.3+.
- The SDK has a new dependency: the URLObject library. This dependency will be automatically installed when you upgrade.
- The SDK now automatically converts between timestamps and Python datetime objects. These automatic conversions are opt-in: your existing code should continue to work unmodified. See the "Timestamps and Datetimes" section of this document for more information.
- The SDK now has over 95% automated test coverage.
- Previously, trying to access the following model properties would raise an error:
Folder.threads,Folder.messages,Label.threads,Label.messages. These properties should now work as expected. - The
Threadmodel now exposes thelast_message_received_timestampandlast_message_sent_timestampproperties, obtained from the Nylas API. - Previously, if you created a
Draftobject, saved it, and then deleted it without modifying it further, the deletion would fail silently. Now, the SDK will actually attempt to delete a newly-savedDraftobject, and will raise an error if it is unable to do so. - Previously, you could initialize an
APIClientwith anapi_servervalue set to anhttp://URL. Now,APIClientwill verify that theapi_servervalue starts withhttps://, and will raise an error if it does not. - The
APIClientconstructor no longers accepts theauth_serverargument, as it was never used for anything. - The
nylas.client.util.url_concatandnylas.client.util.generate_idfunctions have been removed. These functions were meant for internal use, and were never documented or expected to be used by others. - You can now pass a
stateargument toAPIClient.authentication_url, as per the OAuth 2.0 spec.
Some properties in the Nylas API use timestamp integers to represent a specific
moment in time, such as Message.date. The Python SDK now exposes new properties
that have converted these existing properties from integers to Python datetime
objects. You can still access the existing properties to get the timestamp
integer -- these new properties are just a convenient way to access Python
datetime objects, if you want them.
This table summarizes the new datetime properties, and which existing timestamp properties they match up with.
| New Property (datetime) | Existing Property (timestamp) |
|---|---|
Message.received_at |
Message.date |
Thread.first_message_at |
Thread.first_message_timestamp |
Thread.last_message_at |
Thread.last_message_timestamp |
Thread.last_message_received_at |
Thread.last_message_received_timestamp |
Thread.last_message_sent_at |
Thread.last_message_sent_timestamp |
Draft.last_modified_at |
Draft.date |
Event.original_start_at |
Event.original_start_time |
You can also use datetime objects when filtering on models with the .where()
method. For example, if you wanted to find all messages that were received
before Jan 1, 2015, previously you would run this code:
client.messages.where(received_before=1420070400).all()That code will still work, but if you prefer, you can run this code instead:
from datetime import datetime
client.messages.where(received_before=datetime(2015, 1, 1)).all()You can now use datetimes with the following filters:
client.messages.where(received_before=datetime())client.messages.where(received_after=datetime())client.threads.where(last_message_before=datetime())client.threads.where(last_message_after=datetime())client.threads.where(started_before=datetime())client.threads.where(started_after=datetime())
Release May 18, 2017:
- Add support for expanded message view
- Remove deprecated "Inbox" name
- Send correct auth headers for account management
- Respect the offset parameter for restfulmodelcollection
- Add ability to revoke token
Release August 9, 2016:
- Adds full-text search support for Messages and Threads
Released March 25, 2016:
- API client now uses Bearer Token Authorization headers instead of Basic Auth
Released February 5, 2016:
- Fixes a bug that prevented the offset parameter from being used in queries
Released December 17, 2015:
- Deprecate tags and tag-related functions.
- Return message object when sending a draft
- Support passing parameters and request bodies on delete
Released October 8, 2015:
- Add client.account property
Released September 22, 2015:
- Add handling for 405 responses
- Surface SMTP server errors
- Expose Message attributes: events, snippet
- Expose Folder and Label attributes: object, account_id
- Expose Thread attribute: received_recent_date
- Expose Draft attributes: reply_to_message_id, reply_to, starred, snippet
- Expose File attributes: content_id, message_ids
- Expose "object" attribute on Calendar, Event, and Contact
- Add local token for tests
Released September 17, 2015:
Expose "owner" attribute on Events Clean up raw message data
Released August 28, 2015:
Don't first save draft objects when a direct send is possible. Remove deprecated namespaces support from SDK Account management fixes and upgrade/downgrade changes Added tests
Drafts can now be sent without an implicit intermediate save to the mail provider.