Kloudless Blog

Kloudless Unified APIs enable you to code once and integrate many

The Developer Experience is always our first priority, as developers are the primary users of the Kloudless API. Well, we have some good news for developers, especially those using Python. We are pleased to announce a Version 2.0 Release of the Kloudless Python SDK.

New features in 2.0

In this new version, we provide the following general utility functions and classes to help you utilize the Kloudless API.

  • Base client classes like Client and Account to make http requests.
  • Base response classes like Resource and ResourceList to handle http responses.
  • Utility functions for the OAuth authorization code flow.

We’ll guide you through the Python SDK features throughout the rest of this post.

Getting Started

Most Kloudless API endpoints require a developer to connect to an upstream service account. You can start by navigating to our API Explorer to connect an account.

After connecting an account, copy the Bearer Token from the text input box. You’ll be able to initialize an Account instance with the token.

Making API Requests

You’ll be able to make an API request via the account instance you’ve now created. We’ve provided two example code snippets when connecting to a cloud storage service or a calendar service below:

If Connecting to a Cloud Storage Service

If Connecting to a Calendar Service

Authenticating Your Users with OAuth

The OAuth Authorization Code grant flow redirects the user to connect their account to your app. The following example demonstrates how the SDK’s utility methods can help generate the Authorization URL and retrieve the Bearer Token.

Python Django sample code

Insert the following code into Django views under views/ directory and calling it via urls.py.

Use this sample code in any server side web application, and you can now save the tokens for your users’ accounts. Then use the Kloudless Python SDK to make API requests!

Next Steps

If you’re interested in a more detailed reference, please visit our GitHub repository and our documentation hosted on Read the docs. We hope you enjoy coding with the new Kloudless Python SDK!


Share this article:

Let’s get started. Start building for free today.