Skip to content

Python bindings for the Nylas Platform API

License

Notifications You must be signed in to change notification settings

nylas/nylas-python-legacy

 
 

Repository files navigation

Aimeos logo

Nylas Python SDK (Legacy/API v2)

This is the legacy version of the Nylas Python SDK, which supports the Nylas API v2. This version of the SDK is currently in maintenance mode and is supported for the purpose of assisting with migration to the new API v3. We recommend migrating and using the current Nylas Python SDK for the latest and greatest features.

⚙️ Install

The Nylas Python SDK is available via pip:

pip install nylas-legacy

To install the SDK from source, clone this repo and run the install script.

git clone https://github.com/nylas/nylas-python-legacy.git && cd nylas-python-legacy
python setup.py install

⚡️ Usage

To use this SDK, you first need to sign up for a free Nylas developer account.

Then, follow our guide to setup your first app and get your API access keys.

Next, in your python script, import the APIClient class from the nylas package, and create a new instance of this class, passing the variables you gathered when you got your developer API keys. In the following example, replace CLIENT_ID, CLIENT_SECRET, and ACCESS_TOKEN with your values.

from nylas_legacy import APIClient

nylas = APIClient(
    CLIENT_ID,
    CLIENT_SECRET,
    ACCESS_TOKEN
)

Now, you can use nylas to access full email, calendar, and contacts functionality. For example, here is how you would print the subject line for the most recent email message to the console.

message = nylas.messages.first()
print(message.subject)

To learn more about how to use the Nylas Python SDK, please refer to our Python SDK QuickStart Guide and our Python tutorials.

💙 Contributing

Please refer to Contributing for information about how to make contributions to this project. We welcome questions, bug reports, and pull requests.

📝 License

This project is licensed under the terms of the MIT license. Please refer to LICENSE for the full terms.

About

Python bindings for the Nylas Platform API

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%