GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing cloudinary.com — Python Sample Projects | Documentation
Menu
Python sample projectsLast updated: Aug-17-2026 We've created some sample projects to get you started with integrating Cloudinary into your Python applications, featuring both Django and Flask frameworks.
Tip
Check out our collection of Python sample apps too!Basic Python scriptThe basic Python sample in the Cloudinary Python SDK repository is a minimal standalone example: a synchronous script that uploads assets from local files or remote URLs and generates transformed delivery URLs using the Python SDK. For a guided walkthrough of the same core workflow, see the Python quick start. Django photo albumThe Django photo album app showcases various functionalities such as uploading, saving delivery URLs to the database, transforming, and delivering images. In particular, explore how to upload images through your server or via signed and unsigned uploads directly from the browser. Additionally, learn how to apply smart-cropping to uploaded images to fit them in a square and save their delivery URLs to your database. Finally, view all uploaded images displayed in a photo album and seamlessly apply transformations on-the-fly. This is the Django photo album app in action:
Here's an excerpt from the code featuring a
models.py
forms.py Django form and model helpersThe django_cloudinary_app folder in the my-django-app repository demonstrates seamlessly integrating Cloudinary features while preserving your standard workflow of saving delivery URLs directly into your database during uploads. Learn how to upload images to Cloudinary, apply transformations, and store their Cloudinary delivery URLs in your database using Cloudinary's form and model helper classes. Furthermore, within the my-django-app repository, you'll find a django_app folder containing the same application without Cloudinary integration. This application serves as a reference point for comparison. You can review the code that requires modification to integrate Cloudinary. Notice the enhancements Cloudinary brings, including optimized image sizes and improved resize and cropping functionality. This is the Django form and model helpers app in action:
Here's an excerpt from the code for configuring a form and table to enable users to select images for uploading to Cloudinary. After uploading, the URLs for accessing these images are stored in the database.
forms.py
models.py
views.py Django photo collection appThe Django photo collection app offers a user-friendly platform for creating, customizing, and sharing photo collections, suitable for both personal and business purposes. In industries like fashion, these photo collections are often referred to as "lookbooks." Key features of the app include:
This app is designed to make organizing and showcasing your photos simple and visually appealing. This is the Django photo collection app in action:
Below is a snippet from the codebase that outlines how to configure the necessary database tables, forms, and views for creating and displaying lookbooks along with their associated images. This includes the model setup for lookbooks and images, the forms to handle lookbook creation, and the view logic to render a lookbook using Cloudinary's helper methods for image management within an HTML template.
lookbook_app/models.py
lookbook_app/forms.py
lookbook_app/templates/display.html
lookbook_app/views.py
Basic Flask - image uploader and transformerThe Basic Flask - image uploader and transformer demonstrates how you can upload images to Cloudinary and display them on a webpage with various transformations applied. This is the Flask image uploader and transformer app in action:
Here's an excerpt from the code that handles a user-select image passed to the backend using a form. It uploads these images to Cloudinary and then displays both the original and transformed versions on-the-fly.
app.py Flask product recommendationsThis app serves as a recommendation engine for products based on user-selected images. Users can choose product images that are auto-tagged, and the app analyzes them to identify common themes or tags. It then suggests other images with similar themes, providing recommendations for users to explore further. You can read more about it in this blog post. This is the Flask product recommendations app in action:
Here's an excerpt from the code that defines the
demo.py Image pre-processing and augmentationThis Jupyter notebook shows examples of pre-processing and augmenting images for machine learning by applying transformations. You can read more about it in this blog post. This is the image pre-processing and augmentation Jupyter notebook in action:
Here's an excerpt from the code that establishes an upload preset tailored to pre-process images by smart-cropping them to a size of 400x400 pixels. This preset is automatically applied during the upload process. Furthermore, saturation is applied as an augmentation to enhance the flexibility of the image model that this image is being prepared for.
samples.ipynb App GalleryThe Cloudinary app gallery provides a variety of fully working apps that incorporate Cloudinary as part of the tech stack, built in various popular programming languages. Each app in the gallery presents an overview of the functionality, a link to the open-source repo, and complete setup instructions, so that you can grab the code and easily build your own version. ✔️ Feedback sent!
✖️
*
Cloudinary is committed to protecting your information security. For details, see our privacy policy. For additional assistance, open a support request. ErrorUnfortunately there's been an error sending your feedback. Rate this page: |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |