Last updated: Aug-06-2025
OverviewLearn how to install and configure the Cloudinary Python SDK in your Python environment. This will enable you to utilize Cloudinary for uploading, managing, and displaying assets in your applications.
Video tutorialYou can find the code from this tutorial in
GitHub.
Tutorial contentsThis tutorial presents the following topics. Click a timestamp to jump to that part of the video.
Introduction   0:00 The Cloudinary Python SDK gives you a way to handle images and videos at scale, providing transformation, optimization and delivery capabilities that you can integrate seamlessly into your Python applications. Install the Python SDK   0:17 To install the Cloudinary Python SDK in your virtual environment, in a terminal runpip install cloudinary
. Once Cloudinary is installed, you should see it listed as a requirement in your requirements.txt
file inside your Python project. Configure Cloudinary   0:28 First, import the Cloudinary library. Then, add your Cloudinary credentials by creating a Cloudinary instance using cloudinary.config()
. At minimum, you'll need to provide your cloud name to access your stored images. Find your cloud name in the Dashboard. As an additional tip, include the secure=True
parameter to ensure that the URLs generated by Cloudinary are HTTPS.
You can no longer access your full credentials directly from the Dashboard. Find your
Cloud nameon the Dashboard, and all credentials, including
API Key,
API Secret, and
API environment variable, on the
API Keyspage of the Cloudinary Console Settings.
Retrieve an image tag from Cloudinary   1:11 Now, you can start using Cloudinary. For instance, you can use thecloudinary.image
method to fetch an image tag from Cloudinary and exhibit it in your application. Simply indicate the image you want to use by specifying its public ID, accessible from the Summary tab of the asset's Preview Pane in the Media Library. (Replace <public_ID>
with a public ID of an image from your product environment.) Configuring for upload and management   1:28 To upload to Cloudinary or manage your files, you'll need to import the Cloudinary cloudinary.uploader
and cloudinary.api
libraries. Additionally, ensure your API key and secret are added to the configuration. Save your Cloudinary API key and secret as environment variables in a .env
file. Then, install and import the dotenv
library to load them into your project. Use the load dotenv
function to make these environment variables accessible and import the os
library to handle them. Now, you can pass the API key and secret to the cloudinary.config
function, creating a fully authenticated instance. (Replace the placeholders in the example below with your credentials.)
.env
under version control for maximum security..env
file, simply loading its contents using the load.env
function is sufficient. In this case, you won't need to manually create a Cloudinary instance using the cloudinary.config
function. (Replace the placeholders in the example below with your credentials.) Using backend capabilities like upload and manage   2:33 Once completed, you can leverage backend capabilities to upload and manage your Cloudinary media files from your Python app. For instance, you can utilize cloudinary.uploader.upload
to upload an image either from a local file or a URL. Additionally, you can retrieve detailed information on an image by calling the Cloudinary API resource
endpoint. Remember to specify the image you want by using its public ID. Keep learning If you like this, you might also like...
Â
Â
Check out the Cloudinary Academy for free self-paced Cloudinary courses on a variety of developer or DAM topics, or register for formal instructor-led courses, either virtual or on-site.
Â
âï¸ Feedback sent!
âï¸Â  ErrorUnfortunately there's been an error sending your feedback.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4