GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Cloudinary Docs Docs
  • Image & Video APIs
  • Guides
  • References
  • SDKs
  • Release Notes
  • Assets (DAM)
  • User Guides
  • Admin Guides
  • Assets APIs
  • Release Notes
  • MediaFlows
  • PowerFlows
  • EasyFlows

This view

  • Original page
  • New address

GeezerVison is showing cloudinary.com — Python Sample Projects | Documentation

Documentation Index

Fetch the complete documentation index at: https://cloudinary.com/documentation/llms.txt

Use this file to discover all available pages before exploring further.

  • Get Started
    • Image & Video APIs overview
    • AI Power Start
    • SDK Quick Starts
    • Developer Kickstart
      • Step 1: Register and find credentials
      • Step 2: Load pages faster with optimization
      • Step 3: Your first transformations
      • Step 4: Resize transformations
      • Step 5: Set up and run your first SDK project
      • Congrats! You're ready to code!
    • AI agents
      • Agents: start here
      • AI agent tools and MCP servers
    • Try it!
      • Sample apps
      • Feature demos
      • Postman collections
    • VS Code Extension
    • Video tutorial library
      • Programmatic asset management
        • Image onboarding
          • API key and secret
          • Image optimization basics
          • Background removal
          • Edits at scale
          • Programmatic upload
          • Pricing
        • Programmatic upload
          • Upload programmatically
          • Upload with Fetch API
          • Create upload presets (Node.js)
          • Create upload presets (Console UI)
          • Auto upload
          • Moderate images with AI
          • Use AI to generate image captions
          • Upload images in Flutter
          • Upload images in Node.js
          • Auto-tag images in Node.js
          • Upload multiple files in Node.js
          • Upload videos in Node.js
          • Upload images in Python
          • Auto-tag images in Python
          • Upload videos in Python
          • Upload images in PHP
          • Upload images in Go
          • Upload assets in a React app
          • Upload assets in a Vue.js app
          • Drag-and-drop uploads in React
          • Upload assets in a Next.js app
          • Upload assets with Server Actions
          • Upload assets in Svelte
          • Upload assets in a SvelteKit app
          • Upload assets in a Remix app
          • Upload images in Astro
          • Upload images in Hono
          • Use webhooks to remove backgrounds
          • Upload images in Laravel
        • Interaction with Cloudinary APIs
          • Generate upload signature
          • Postman collections introduction
        • Cloudinary SDKs
          • Find your credentials
          • Configure the JavaScript SDK
          • Configure the React SDK
          • Configure the Angular SDK
          • Configure the Flutter SDK
          • Configure Svelte Cloudinary
          • Configure the Javascript SDK in Svelte
          • Getting started with Cloudinary in Node.js
          • Configure the Node.js SDK
          • Configure the Python SDK
          • Configure the PHP SDK
          • Install and configure Laravel SDK
          • Configure the Go SDK
          • Configure the Vue.js SDK
          • Configure the Next.js SDK
          • List images in Next.js
          • Lazy load images with Next.js
          • Add images to Sanity with Next.js
          • Image fallbacks in JavaScript
          • Captioning on upload with Node.js
          • Create PDFs from images in Node.js
          • Delete assets with Node.js
          • Manage images in a Django app
          • Image gallery with Astro
        • Cloudinary CLI
          • Get started with the CLI
          • Scripting with the CLI
          • Upload with the CLI
        • Widgets and tools
          • Upload Widget
          • Product Gallery
          • Product Gallery in React
          • Product Gallery accessibility
          • VS Code extension
      • Optimization and delivery
        • Programmatic optimization
          • Optimization tips
          • Optimize images in React
          • Optimize videos in React
          • Transform and optimize images in Svelte
          • Optimize videos in Next.js
          • Next.js image optimization
          • Optimize images with Nuxt Cloudinary
          • Optimize images in SolidJS with Cloudinary
          • Optimize images in Flutter
          • Optimize images in Laravel
        • Programmatic delivery
          • Deliver images with the Next.js Image component
          • Deliver images with the Nuxt Image component
          • Diagnosing error codes
        • Video Player
          • Video Player in React
          • Video Player in Next.js
          • ABR streaming in Next.js
          • Video Player in HTML
          • Video Player in Svelte
      • Transformations
        • Get started with transformations
          • Transformation basics
          • Transformation Builder
          • Gravity-based crops for images
          • Enhance and restore images
          • Transformation overlays
          • Content-aware image cropping
          • Content-aware video cropping
          • Convert videos to animated images
        • Advanced transformation features
          • Text overlay transformations
          • Add watermarks in JavaScript
          • Complex transformations
          • Named transformations
          • Advanced image components
          • Trim videos in Node.js
          • Splice videos in Node.js
          • Zoompan effect
          • Video transformations
          • Crop and resize images in React
          • Crop and resize videos in React
          • Crop and resize images in Python
          • Crop images in PHP
          • Remove backgrounds and add drop shadows
          • AI generative fill in Next.js
          • Color accessibility in JavaScript
        • Transformations for social media
          • Social media image cards in Next.js
          • Social media image cards in Svelte
      • Dev Hints on YouTube
      • Dev Hints en Español
      • Cloudinary Café Training Sessions
    • Additional onboarding resources
      • Service introduction
      • Onboarding FAQ
        • Enterprise onboarding FAQ
          • Migration guide
          • Glossary
      • Guides
        • Cloudinary Image
          • Product overview
          • Image transformations
            • Image transformations overview
            • Named transformations
            • Transformation rollout
            • Image format support
            • Delivery types and flags
            • Transformation types
            • Resizing and cropping
              • Overview
              • Crop modes
              • Resize modes
              • Padding modes
              • Gravity for crops
              • Automatic gravity
              • Upscaling and downscaling
            • Placing layers on images
              • Layer syntax
              • Layer placement
                • Side-by-Side, vertical, and collage layouts
              • Text layer options
                • Custom and special fonts
                • Advanced text layer options
              • Transforming layers
              • Underlays, watermarking, and special effects
            • Effects and enhancements
              • Overview
              • Image enhancement
              • Color effects
              • Artistic effects
              • Reshaping and distorting
                • Displacement, rotation, rounding, and zoompan
                • Image distortion
                • Shape cutouts
            • Background removal
            • Generative AI transformations
              • Background replace
              • Fill
              • Recolor
              • Remove
              • Replace
              • Restore
            • Face-detection based transformations
            • Advanced image transformations
              • Custom focus areas
              • Transformation refiners
              • Animated images
              • Transformations on 3D models
              • Conditional transformations
                • Specifying conditions
                • Specifying transformations for a condition
                • Advanced conditional transformations
              • User-defined variables and arithmetic transformations
              • Custom functions
            • Image transformation recipes
              • Crop around a person's full body
              • Add a horizontal line
              • Resize with percentage padding on a canvas
              • Instagram Story with photo and text
              • Add a solid color shape over an image
              • Offset the crop position around a face
          • Image optimization and delivery
            • Optimization overview
            • Image optimization
              • Image optimization basics
              • PDF optimization
              • Optimize by default
            • Responsive images
              • Using HTML and dynamic image transformations
              • Using JavaScript frontend frameworks
              • Using the cloudinary-core JS library
              • Using client hints
            • Deliver remote media files
              • Social media profile pictures
            • PDF and Photoshop files
            • Media access methods
            • CDN delivery options
          • Programmatic image creation
            • Animated images
            • Archives
            • PDF files from images
            • Images from text
          • Product Gallery widget
            • Product Gallery changelog
          • Media Editor widget
          • Image add-ons
          • Troubleshooting and tips
            • Troubleshooting image transformation and delivery errors
            • Menu Title
            • Images delivered without gzip compression
            • Long time to first byte (TTFB) on WebPageTest.org
            • Update a named transformation
            • Cloudinary vs Imagga cropping
            • Placeholder images (LQIP)
            • How to detect corrupted images
            • Force specific image when sharing links on Facebook
            • Blurry images
        • Cloudinary Video
          • Product overview
          • Cloudinary Video Player
            • Video Player features
            • When to use the video player
            • Installation and setup
            • How to embed the Video Player
            • Video Player Studio
            • Video Player customization
            • Playlists and recommendations
            • HLS and MPEG-DASH
            • Video Player accessibility
            • Video Player advanced features
              • Events and analytics
              • Video ads and monetization
              • Shoppable Video
              • Interactive Video (Beta)
            • Video Player API reference
            • Player Profiles API reference
            • Video Config API reference
          • Adaptive bitrate streaming
          • Video transformations
            • Video transformations overview
            • Named transformations
            • Transformation rollout
            • Video Canvas
            • Transcoding and formats
            • Delivery types and flags
            • Transformation types
            • Resizing and cropping
              • Overview
              • Crop modes
              • Resize modes
              • Gravity for crops
            • Trimming and concatenating
              • Overview
              • Trimming
              • Concatenation
              • Transition effects
            • Placing layers on videos
              • Layer syntax
              • Layer placement
              • Text layer options
                • Custom and special fonts
                • Advanced text layer options
              • Transforming layers
              • Underlays, watermarking, and special effects
            • Effects and enhancements
              • Overview
              • Color effects
              • Artistic effects
              • Playback effects
              • Reshaping and rotating
              • Previews and posters
            • Audio transformations
            • Advanced video transformations
              • Converting videos to animated images
              • Conditional transformations
                • Specifying conditions
                • Specifying transformations for a condition
                • Advanced conditional transformations
              • User-defined variables and arithmetic transformations
            • Video transformation recipes
              • White background looping GIF
              • Add a logo or watermark to a video
              • Resize a video for social media
              • Create a poster image from a video frame
          • Video and audio optimization
            • Video optimization
            • Adaptive bitrate streaming
            • Audio optimization
          • Video transcription
          • AI Video Analysis
          • AI Video Analysis API reference
          • Video analytics
          • Live streaming
            • Live Streaming API reference
            • Simulated live streaming
          • Video add-ons
          • Video best practices
          • Social media videos
          • Troubleshooting and tips
            • Troubleshooting video transformation errors
            • Video duration missing on first play
            • Remove codec from Content-Type
        • Upload
          • Uploading assets
          • Customizing uploads
          • Post-upload processing
          • Client-side uploading
          • Upload presets
          • Upload widget
            • Upload widget changelog
          • Troubleshooting and tips
            • Unsigned upload from Google Apps Script
            • Rejected file formats
            • Troubleshooting failed upload requests
            • Always upload a square image
            • Unsupported parameters in unsigned uploads
            • Uploaded image truncated
            • Upload failed - cloud_name is disabled error
            • Upload with FileMaker
        • Asset management
          • CRUD asset management APIs
            • List assets
            • Update assets
            • Delete assets
            • Rename assets
            • Relate assets
          • Media Library for developers
          • Search for assets
            • Search API method
            • Cacheable search URLs
            • Visual Search
            • Search expressions
          • Eager and incoming transformations
          • Custom metadata
            • Tags
            • Contextual metadata
            • Structured metadata
              • Conditional metadata rules
          • Analyze assets
            • Image quality analysis
            • Accessibility analysis
            • Semantic data extraction
            • Media Inspector
            • Analyze API (Beta)
          • Moderate assets
          • Webhook notifications
          • Advanced asset management
            • Signatures
              • Authentication signatures
              • Notification signatures
              • Delivery URL signatures
              • Response signatures
            • Provenance and authenticity
            • Backups and version management
            • Invalidate cached assets
          • Add-ons
          • Troubleshooting and tips
            • Admin API authentication issues
            • Why has the public ID of my asset changed?
            • Asset ID vs public ID
            • Check resource type and delivery type
            • Get image or video dimensions
            • Download account assets
            • Delete or modify original images
            • Does Cloudinary store any cookies?
            • Underscores in public IDs or folder names
            • Update already fetched asset
            • Upload, manage, and deliver PDFs
            • Cloudinary "sample" images
            • Avoiding duplicate uploads
            • Permitted naming conventions
            • Adult/NSFW content policy
            • High transformation rate
        • Account management
          • Account settings
            • Folder modes
          • Product environment settings
          • User provisioning
            • SAML SSO
          • Billing and plans
          • Roles and Permissions
            • Migrating to Roles and Permissions
              • Legacy permissions
            • Manage & assign roles in the Console
            • Roles and Permissions via API
              • Manage roles
              • Assign roles
              • Define custom policies
            • System roles and policies list
          • Usage data
          • How are transformations counted?
          • Troubleshooting and tips
            • Cancel or delete Cloudinary account
            • Sign up or add user with existing email
            • Credit card payments
            • Recover disabled account
            • Can't downgrade my plan
            • Migrate Media Optimizer account
            • Why did my usage spike?
            • Rotate API keys in the Console
            • Successfully go live with Cloudinary
            • Bot traffic and access control
        • Retail and e-commerce
          • Best practices
          • Visual differentiators
          • Customize and optimize assets
          • Workflows
            • Product asset workflows
            • Non-product asset workflows
            • Multi-channel content delivery
        • User-generated content
          • Overview
          • Upload
          • Manage and analyze
          • Transform and customize
          • Optimize and deliver
          • Profile picture sample project
          • Video review sample project
          • Marketplace products sample project
          • Try before you buy sample project
            • Delete temporary UGC assets
        • Accessible media
          • Overview
          • Image accessibility
          • Video and audio accessibility
          • Image and video adaptability
          • Visual and audio clarity
            • Color accessibility
            • Text, contrast, and color
            • Audio controls and mixing
          • Interactive content and controls
        • AI in action
        • Native mobile
        • Add-ons
          • Advanced Facial Attributes Detection
          • Amazon Rekognition AI Moderation
          • Amazon Rekognition Video Moderation
          • Amazon Rekognition Auto Tagging
          • Amazon Rekognition Celebrity Detection
          • Aspose Document Conversion
          • Cloudinary AI Background Removal
          • Cloudinary AI Content Analysis
            • Overview
            • Object-aware cropping
            • Automatic image tagging
            • Image analysis
          • Cloudinary AI Vision
          • Cloudinary Duplicate Image Detection
          • Cloudinary Image Generation
          • Google AI Video Moderation
          • Google AI Video Transcription
          • Google Auto Tagging
          • Google Automatic Video Tagging
          • Google Translation
          • Image to Video
          • Image to Video API reference
          • Imagga Auto Tagging
          • Imagga Crop and Scale
          • Perception Point Malware Detection
          • Microsoft Azure Video Indexer
          • OCR Text Detection and Extraction
          • Pixelz - Remove the Background
          • URL2PNG Website Screenshots
          • VIESUS™ Automatic Image Enhancement
          • WebPurify Image Moderation
      • References
        • Transformation URL API
        • Upload API
        • Admin API
        • Cloudinary CLI
        • Image APIs
          • Analyze API (Beta)
          • Image Generation API
        • Video APIs
          • AI Video Analysis API (Beta)
          • Image to Video API
          • Live Streaming API
          • Player Profiles API
          • Video Canvas API
          • Video Config API
          • Video Player API
        • Widget APIs
          • Media Editor API
          • Media Library Widget API
          • Product Gallery API
          • Studio Widget API
          • Upload Widget API
        • Account management APIs
          • Agent account creation API
          • Claimable Cloud API
          • Permissions API
          • Provisioning API
        • SDK references
          • Angular SDK reference
          • Dart SDK reference
          • Flutter SDK reference
          • Go SDK reference
          • JavaScript SDK reference
          • PHP SDK reference
          • React SDK reference
          • Transformation Builder reference
          • Vue.js SDK reference
        • Postman collections
      • SDKs
        • Backend SDKs
          • Node.js SDK
            • Node.js introduction
            • Node.js quick start
            • Node.js image and video upload
            • Node.js image transformations
            • Node.js video transformations
            • Node.js asset management
            • Node.js sample projects
            • Node.js video tutorials
          • Python SDK
            • Python introduction
            • Python quick start
            • Python image and video upload
            • Python image transformations
            • Python video transformations
            • Python asset management
            • Python sample projects
            • Python video tutorials
          • PHP SDK
            • PHP introduction
            • PHP quick start
            • PHP image and video upload
            • PHP image transformations
            • PHP video transformations
            • PHP asset management
            • PHP sample projects
            • PHP video tutorials
            • PHP Management reference
            • PHP Transformation reference
          • Java SDK
            • Java introduction
            • Java quick start
            • Java image and video upload
            • Java image transformations
            • Java video transformations
            • Java asset management
          • Ruby/Rails SDK
            • Ruby/Rails introduction
            • Ruby/Rails quick start
            • Ruby/Rails image and video upload
            • Ruby/Rails image transformations
            • Ruby/Rails video transformations
            • Ruby/Rails asset management
            • CarrierWave integration
            • Attachinary integration
            • Active Storage integration
          • .NET SDK
            • .NET introduction
            • .NET quick start
            • .NET image and video upload
            • .NET image transformations
            • .NET video transformations
            • .NET asset management
          • Go SDK
            • Go introduction
            • Go quick start
            • Go image and video upload
            • Go media transformations
            • Go asset management
            • Go sample projects
            • Go video tutorials
            • Go SDK reference
          • Dart SDK
            • Dart introduction
            • Dart quick start
            • Dart image and video upload
            • Dart media transformations
            • Dart SDK reference
        • Frontend SDKs
          • React SDK
            • React introduction
            • React Starter Kit
            • React quick start
            • React image and video upload
            • React image transformations
            • React video transformations
            • React sample projects
            • React video tutorials
            • React SDK reference
            • Transformation Builder reference
          • Vue.js SDK
            • Vue.js introduction
            • Vue.js quick start
            • Vue.js image and video upload
            • Vue.js image transformations
            • Vue.js video transformations
            • Vue.js sample projects
            • Vue.js video tutorials
            • Vue.js SDK reference
            • Transformation Builder reference
          • Angular SDK
            • Angular introduction
            • Angular quick start
            • Angular image and video upload
            • Angular image transformations
            • Angular video transformations
            • Angular sample projects
            • Angular video tutorials
            • Angular SDK reference
            • Transformation Builder reference
          • JavaScript SDK
            • JavaScript introduction
            • JavaScript quick start
            • JavaScript image and video upload
            • JavaScript image transformations
            • JavaScript video transformations
            • JavaScript sample projects
            • JavaScript video tutorials
            • JavaScript SDK reference
            • Transformation Builder reference
          • Next.js SDK
            • Next.js introduction
            • Next.js Starter Kit
            • Next.js quick start
            • Next.js image and video upload
            • Next.js image transformations
            • Next.js video transformations
            • Next.js sample projects
            • Next.js video tutorials
          • jQuery SDK
            • jQuery introduction
            • jQuery image and video upload
            • jQuery image transformations
            • jQuery video transformations
          • React SDK (Legacy)
            • React introduction
            • React image and video upload
            • React image transformations
            • React video transformations
            • React migration guide
          • Vue.js SDK (Legacy)
            • Vue.js introduction
            • Vue.js image and video upload
            • Vue.js image transformations
            • Vue.js video transformations
            • Vue.js migration guide
          • Angular SDK (Legacy)
            • Angular introduction
            • Angular image and video upload
            • Angular image transformations
            • Angular video transformations
            • Angular migration guide
          • JavaScript SDK (Legacy)
            • JavaScript introduction
            • JavaScript image and video upload
            • JavaScript image transformations
            • JavaScript video transformations
            • JavaScript migration guide
        • Mobile SDKs
          • iOS SDK
            • iOS introduction
            • iOS quick start
            • iOS image and video upload
            • iOS image transformations
            • iOS video transformations
            • iOS video player
            • iOS sample projects
          • Android SDK
            • Android introduction
            • Android quick start
            • Android image and video upload
            • Android image transformations
            • Android video transformations
            • Android video player
            • Android sample projects
          • Flutter SDK
            • Flutter introduction
            • Flutter quick start
            • Flutter image and video upload
            • Flutter media transformations
            • Flutter video player
            • Flutter video tutorials
            • Dart-based cloudinary_url_gen package reference
            • Flutter SDK reference
          • React Native SDK
            • React Native introduction
            • React Native image and video upload
            • React Native image transformations
            • React Native video transformations
            • React Native video player
          • Kotlin SDK
            • Kotlin introduction
            • Kotlin media transformations
        • Community-developed libraries
          • Astro
          • Laravel
          • NuxtJS
          • Svelte
          • Gatsby
          • Netlify
          • Drupal
      • Release Notes
        • Latest: October 31, 2026
        • August 31, 2026
        • July 9, 2026
        • Previous releases
          • May 28, 2026
          • April 7, 2026
          • February 28, 2026
          • January 30, 2026
          • 2025
            • December 18, 2025
            • October 31, 2025
            • September 3, 2025
            • July 09, 2025
            • May 27, 2025
          • 2024
            • November 29, 2024
            • October 9, 2024
            • August 12, 2024
            • June 27, 2024
            • May 31, 2024
            • April 16, 2024
            • February 28, 2024
            • January 03, 2024
          • 2023
            • November 13, 2023
            • October 26, 2023
            • September 21, 2023
            • August 15, 2023
            • July 13, 2023
            • June 19, 2023
            • May 16, 2023
            • Apr 04, 2023
            • Feb 21, 2023
          • 2022
            • Dec 27, 2022
      Image & Video APIs
      • Get Started
      • Guides
      • References
      • SDKs
      • Release Notes
      Assets (DAM)
      • Get Started
      • User Guides
      • Admin Guides
      • Assets APIs
      • Release Notes
      MediaFlows
      • Get Started
      • PowerFlows
      • EasyFlows
      • Release Notes
    • More Products
        Integrations
        Add Cloudinary capabilities to your tech stack apps and platforms
        Cloudinary Moderation
        AI-powered visual quality and brand checks
    • Resources
        Blog
        Training
        Support
        Demos
        Additional Resources
    • Pricing
      sign up for free
      Menu
      • Get Started
        • Image & Video APIs overview
        • AI Power Start
        • SDK Quick Starts
        • Developer Kickstart
          • Step 1: Register and find credentials
          • Step 2: Load pages faster with optimization
          • Step 3: Your first transformations
          • Step 4: Resize transformations
          • Step 5: Set up and run your first SDK project
          • Congrats! You're ready to code!
        • AI agents
          • Agents: start here
          • AI agent tools and MCP servers
        • Try it!
          • Sample apps
          • Feature demos
          • Postman collections
        • VS Code Extension
        • Video tutorial library
          • Programmatic asset management
            • Image onboarding
              • API key and secret
              • Image optimization basics
              • Background removal
              • Edits at scale
              • Programmatic upload
              • Pricing
            • Programmatic upload
              • Upload programmatically
              • Upload with Fetch API
              • Create upload presets (Node.js)
              • Create upload presets (Console UI)
              • Auto upload
              • Moderate images with AI
              • Use AI to generate image captions
              • Upload images in Flutter
              • Upload images in Node.js
              • Auto-tag images in Node.js
              • Upload multiple files in Node.js
              • Upload videos in Node.js
              • Upload images in Python
              • Auto-tag images in Python
              • Upload videos in Python
              • Upload images in PHP
              • Upload images in Go
              • Upload assets in a React app
              • Upload assets in a Vue.js app
              • Drag-and-drop uploads in React
              • Upload assets in a Next.js app
              • Upload assets with Server Actions
              • Upload assets in Svelte
              • Upload assets in a SvelteKit app
              • Upload assets in a Remix app
              • Upload images in Astro
              • Upload images in Hono
              • Use webhooks to remove backgrounds
              • Upload images in Laravel
            • Interaction with Cloudinary APIs
              • Generate upload signature
              • Postman collections introduction
            • Cloudinary SDKs
              • Find your credentials
              • Configure the JavaScript SDK
              • Configure the React SDK
              • Configure the Angular SDK
              • Configure the Flutter SDK
              • Configure Svelte Cloudinary
              • Configure the Javascript SDK in Svelte
              • Getting started with Cloudinary in Node.js
              • Configure the Node.js SDK
              • Configure the Python SDK
              • Configure the PHP SDK
              • Install and configure Laravel SDK
              • Configure the Go SDK
              • Configure the Vue.js SDK
              • Configure the Next.js SDK
              • List images in Next.js
              • Lazy load images with Next.js
              • Add images to Sanity with Next.js
              • Image fallbacks in JavaScript
              • Captioning on upload with Node.js
              • Create PDFs from images in Node.js
              • Delete assets with Node.js
              • Manage images in a Django app
              • Image gallery with Astro
            • Cloudinary CLI
              • Get started with the CLI
              • Scripting with the CLI
              • Upload with the CLI
            • Widgets and tools
              • Upload Widget
              • Product Gallery
              • Product Gallery in React
              • Product Gallery accessibility
              • VS Code extension
          • Optimization and delivery
            • Programmatic optimization
              • Optimization tips
              • Optimize images in React
              • Optimize videos in React
              • Transform and optimize images in Svelte
              • Optimize videos in Next.js
              • Next.js image optimization
              • Optimize images with Nuxt Cloudinary
              • Optimize images in SolidJS with Cloudinary
              • Optimize images in Flutter
              • Optimize images in Laravel
            • Programmatic delivery
              • Deliver images with the Next.js Image component
              • Deliver images with the Nuxt Image component
              • Diagnosing error codes
            • Video Player
              • Video Player in React
              • Video Player in Next.js
              • ABR streaming in Next.js
              • Video Player in HTML
              • Video Player in Svelte
          • Transformations
            • Get started with transformations
              • Transformation basics
              • Transformation Builder
              • Gravity-based crops for images
              • Enhance and restore images
              • Transformation overlays
              • Content-aware image cropping
              • Content-aware video cropping
              • Convert videos to animated images
            • Advanced transformation features
              • Text overlay transformations
              • Add watermarks in JavaScript
              • Complex transformations
              • Named transformations
              • Advanced image components
              • Trim videos in Node.js
              • Splice videos in Node.js
              • Zoompan effect
              • Video transformations
              • Crop and resize images in React
              • Crop and resize videos in React
              • Crop and resize images in Python
              • Crop images in PHP
              • Remove backgrounds and add drop shadows
              • AI generative fill in Next.js
              • Color accessibility in JavaScript
            • Transformations for social media
              • Social media image cards in Next.js
              • Social media image cards in Svelte
          • Dev Hints on YouTube
          • Dev Hints en Español
          • Cloudinary Café Training Sessions
        • Additional onboarding resources
          • Service introduction
          • Onboarding FAQ
            • Enterprise onboarding FAQ
              • Migration guide
              • Glossary
          • Guides
            • Cloudinary Image
              • Product overview
              • Image transformations
                • Image transformations overview
                • Named transformations
                • Transformation rollout
                • Image format support
                • Delivery types and flags
                • Transformation types
                • Resizing and cropping
                  • Overview
                  • Crop modes
                  • Resize modes
                  • Padding modes
                  • Gravity for crops
                  • Automatic gravity
                  • Upscaling and downscaling
                • Placing layers on images
                  • Layer syntax
                  • Layer placement
                    • Side-by-Side, vertical, and collage layouts
                  • Text layer options
                    • Custom and special fonts
                    • Advanced text layer options
                  • Transforming layers
                  • Underlays, watermarking, and special effects
                • Effects and enhancements
                  • Overview
                  • Image enhancement
                  • Color effects
                  • Artistic effects
                  • Reshaping and distorting
                    • Displacement, rotation, rounding, and zoompan
                    • Image distortion
                    • Shape cutouts
                • Background removal
                • Generative AI transformations
                  • Background replace
                  • Fill
                  • Recolor
                  • Remove
                  • Replace
                  • Restore
                • Face-detection based transformations
                • Advanced image transformations
                  • Custom focus areas
                  • Transformation refiners
                  • Animated images
                  • Transformations on 3D models
                  • Conditional transformations
                    • Specifying conditions
                    • Specifying transformations for a condition
                    • Advanced conditional transformations
                  • User-defined variables and arithmetic transformations
                  • Custom functions
                • Image transformation recipes
                  • Crop around a person's full body
                  • Add a horizontal line
                  • Resize with percentage padding on a canvas
                  • Instagram Story with photo and text
                  • Add a solid color shape over an image
                  • Offset the crop position around a face
              • Image optimization and delivery
                • Optimization overview
                • Image optimization
                  • Image optimization basics
                  • PDF optimization
                  • Optimize by default
                • Responsive images
                  • Using HTML and dynamic image transformations
                  • Using JavaScript frontend frameworks
                  • Using the cloudinary-core JS library
                  • Using client hints
                • Deliver remote media files
                  • Social media profile pictures
                • PDF and Photoshop files
                • Media access methods
                • CDN delivery options
              • Programmatic image creation
                • Animated images
                • Archives
                • PDF files from images
                • Images from text
              • Product Gallery widget
                • Product Gallery changelog
              • Media Editor widget
              • Image add-ons
              • Troubleshooting and tips
                • Troubleshooting image transformation and delivery errors
                • Menu Title
                • Images delivered without gzip compression
                • Long time to first byte (TTFB) on WebPageTest.org
                • Update a named transformation
                • Cloudinary vs Imagga cropping
                • Placeholder images (LQIP)
                • How to detect corrupted images
                • Force specific image when sharing links on Facebook
                • Blurry images
            • Cloudinary Video
              • Product overview
              • Cloudinary Video Player
                • Video Player features
                • When to use the video player
                • Installation and setup
                • How to embed the Video Player
                • Video Player Studio
                • Video Player customization
                • Playlists and recommendations
                • HLS and MPEG-DASH
                • Video Player accessibility
                • Video Player advanced features
                  • Events and analytics
                  • Video ads and monetization
                  • Shoppable Video
                  • Interactive Video (Beta)
                • Video Player API reference
                • Player Profiles API reference
                • Video Config API reference
              • Adaptive bitrate streaming
              • Video transformations
                • Video transformations overview
                • Named transformations
                • Transformation rollout
                • Video Canvas
                • Transcoding and formats
                • Delivery types and flags
                • Transformation types
                • Resizing and cropping
                  • Overview
                  • Crop modes
                  • Resize modes
                  • Gravity for crops
                • Trimming and concatenating
                  • Overview
                  • Trimming
                  • Concatenation
                  • Transition effects
                • Placing layers on videos
                  • Layer syntax
                  • Layer placement
                  • Text layer options
                    • Custom and special fonts
                    • Advanced text layer options
                  • Transforming layers
                  • Underlays, watermarking, and special effects
                • Effects and enhancements
                  • Overview
                  • Color effects
                  • Artistic effects
                  • Playback effects
                  • Reshaping and rotating
                  • Previews and posters
                • Audio transformations
                • Advanced video transformations
                  • Converting videos to animated images
                  • Conditional transformations
                    • Specifying conditions
                    • Specifying transformations for a condition
                    • Advanced conditional transformations
                  • User-defined variables and arithmetic transformations
                • Video transformation recipes
                  • White background looping GIF
                  • Add a logo or watermark to a video
                  • Resize a video for social media
                  • Create a poster image from a video frame
              • Video and audio optimization
                • Video optimization
                • Adaptive bitrate streaming
                • Audio optimization
              • Video transcription
              • AI Video Analysis
              • AI Video Analysis API reference
              • Video analytics
              • Live streaming
                • Live Streaming API reference
                • Simulated live streaming
              • Video add-ons
              • Video best practices
              • Social media videos
              • Troubleshooting and tips
                • Troubleshooting video transformation errors
                • Video duration missing on first play
                • Remove codec from Content-Type
            • Upload
              • Uploading assets
              • Customizing uploads
              • Post-upload processing
              • Client-side uploading
              • Upload presets
              • Upload widget
                • Upload widget changelog
              • Troubleshooting and tips
                • Unsigned upload from Google Apps Script
                • Rejected file formats
                • Troubleshooting failed upload requests
                • Always upload a square image
                • Unsupported parameters in unsigned uploads
                • Uploaded image truncated
                • Upload failed - cloud_name is disabled error
                • Upload with FileMaker
            • Asset management
              • CRUD asset management APIs
                • List assets
                • Update assets
                • Delete assets
                • Rename assets
                • Relate assets
              • Media Library for developers
              • Search for assets
                • Search API method
                • Cacheable search URLs
                • Visual Search
                • Search expressions
              • Eager and incoming transformations
              • Custom metadata
                • Tags
                • Contextual metadata
                • Structured metadata
                  • Conditional metadata rules
              • Analyze assets
                • Image quality analysis
                • Accessibility analysis
                • Semantic data extraction
                • Media Inspector
                • Analyze API (Beta)
              • Moderate assets
              • Webhook notifications
              • Advanced asset management
                • Signatures
                  • Authentication signatures
                  • Notification signatures
                  • Delivery URL signatures
                  • Response signatures
                • Provenance and authenticity
                • Backups and version management
                • Invalidate cached assets
              • Add-ons
              • Troubleshooting and tips
                • Admin API authentication issues
                • Why has the public ID of my asset changed?
                • Asset ID vs public ID
                • Check resource type and delivery type
                • Get image or video dimensions
                • Download account assets
                • Delete or modify original images
                • Does Cloudinary store any cookies?
                • Underscores in public IDs or folder names
                • Update already fetched asset
                • Upload, manage, and deliver PDFs
                • Cloudinary "sample" images
                • Avoiding duplicate uploads
                • Permitted naming conventions
                • Adult/NSFW content policy
                • High transformation rate
            • Account management
              • Account settings
                • Folder modes
              • Product environment settings
              • User provisioning
                • SAML SSO
              • Billing and plans
              • Roles and Permissions
                • Migrating to Roles and Permissions
                  • Legacy permissions
                • Manage & assign roles in the Console
                • Roles and Permissions via API
                  • Manage roles
                  • Assign roles
                  • Define custom policies
                • System roles and policies list
              • Usage data
              • How are transformations counted?
              • Troubleshooting and tips
                • Cancel or delete Cloudinary account
                • Sign up or add user with existing email
                • Credit card payments
                • Recover disabled account
                • Can't downgrade my plan
                • Migrate Media Optimizer account
                • Why did my usage spike?
                • Rotate API keys in the Console
                • Successfully go live with Cloudinary
                • Bot traffic and access control
            • Retail and e-commerce
              • Best practices
              • Visual differentiators
              • Customize and optimize assets
              • Workflows
                • Product asset workflows
                • Non-product asset workflows
                • Multi-channel content delivery
            • User-generated content
              • Overview
              • Upload
              • Manage and analyze
              • Transform and customize
              • Optimize and deliver
              • Profile picture sample project
              • Video review sample project
              • Marketplace products sample project
              • Try before you buy sample project
                • Delete temporary UGC assets
            • Accessible media
              • Overview
              • Image accessibility
              • Video and audio accessibility
              • Image and video adaptability
              • Visual and audio clarity
                • Color accessibility
                • Text, contrast, and color
                • Audio controls and mixing
              • Interactive content and controls
            • AI in action
            • Native mobile
            • Add-ons
              • Advanced Facial Attributes Detection
              • Amazon Rekognition AI Moderation
              • Amazon Rekognition Video Moderation
              • Amazon Rekognition Auto Tagging
              • Amazon Rekognition Celebrity Detection
              • Aspose Document Conversion
              • Cloudinary AI Background Removal
              • Cloudinary AI Content Analysis
                • Overview
                • Object-aware cropping
                • Automatic image tagging
                • Image analysis
              • Cloudinary AI Vision
              • Cloudinary Duplicate Image Detection
              • Cloudinary Image Generation
              • Google AI Video Moderation
              • Google AI Video Transcription
              • Google Auto Tagging
              • Google Automatic Video Tagging
              • Google Translation
              • Image to Video
              • Image to Video API reference
              • Imagga Auto Tagging
              • Imagga Crop and Scale
              • Perception Point Malware Detection
              • Microsoft Azure Video Indexer
              • OCR Text Detection and Extraction
              • Pixelz - Remove the Background
              • URL2PNG Website Screenshots
              • VIESUS™ Automatic Image Enhancement
              • WebPurify Image Moderation
          • References
            • Transformation URL API
            • Upload API
            • Admin API
            • Cloudinary CLI
            • Image APIs
              • Analyze API (Beta)
              • Image Generation API
            • Video APIs
              • AI Video Analysis API (Beta)
              • Image to Video API
              • Live Streaming API
              • Player Profiles API
              • Video Canvas API
              • Video Config API
              • Video Player API
            • Widget APIs
              • Media Editor API
              • Media Library Widget API
              • Product Gallery API
              • Studio Widget API
              • Upload Widget API
            • Account management APIs
              • Agent account creation API
              • Claimable Cloud API
              • Permissions API
              • Provisioning API
            • SDK references
              • Angular SDK reference
              • Dart SDK reference
              • Flutter SDK reference
              • Go SDK reference
              • JavaScript SDK reference
              • PHP SDK reference
              • React SDK reference
              • Transformation Builder reference
              • Vue.js SDK reference
            • Postman collections
          • SDKs
            • Backend SDKs
              • Node.js SDK
                • Node.js introduction
                • Node.js quick start
                • Node.js image and video upload
                • Node.js image transformations
                • Node.js video transformations
                • Node.js asset management
                • Node.js sample projects
                • Node.js video tutorials
              • Python SDK
                • Python introduction
                • Python quick start
                • Python image and video upload
                • Python image transformations
                • Python video transformations
                • Python asset management
                • Python sample projects
                • Python video tutorials
              • PHP SDK
                • PHP introduction
                • PHP quick start
                • PHP image and video upload
                • PHP image transformations
                • PHP video transformations
                • PHP asset management
                • PHP sample projects
                • PHP video tutorials
                • PHP Management reference
                • PHP Transformation reference
              • Java SDK
                • Java introduction
                • Java quick start
                • Java image and video upload
                • Java image transformations
                • Java video transformations
                • Java asset management
              • Ruby/Rails SDK
                • Ruby/Rails introduction
                • Ruby/Rails quick start
                • Ruby/Rails image and video upload
                • Ruby/Rails image transformations
                • Ruby/Rails video transformations
                • Ruby/Rails asset management
                • CarrierWave integration
                • Attachinary integration
                • Active Storage integration
              • .NET SDK
                • .NET introduction
                • .NET quick start
                • .NET image and video upload
                • .NET image transformations
                • .NET video transformations
                • .NET asset management
              • Go SDK
                • Go introduction
                • Go quick start
                • Go image and video upload
                • Go media transformations
                • Go asset management
                • Go sample projects
                • Go video tutorials
                • Go SDK reference
              • Dart SDK
                • Dart introduction
                • Dart quick start
                • Dart image and video upload
                • Dart media transformations
                • Dart SDK reference
            • Frontend SDKs
              • React SDK
                • React introduction
                • React Starter Kit
                • React quick start
                • React image and video upload
                • React image transformations
                • React video transformations
                • React sample projects
                • React video tutorials
                • React SDK reference
                • Transformation Builder reference
              • Vue.js SDK
                • Vue.js introduction
                • Vue.js quick start
                • Vue.js image and video upload
                • Vue.js image transformations
                • Vue.js video transformations
                • Vue.js sample projects
                • Vue.js video tutorials
                • Vue.js SDK reference
                • Transformation Builder reference
              • Angular SDK
                • Angular introduction
                • Angular quick start
                • Angular image and video upload
                • Angular image transformations
                • Angular video transformations
                • Angular sample projects
                • Angular video tutorials
                • Angular SDK reference
                • Transformation Builder reference
              • JavaScript SDK
                • JavaScript introduction
                • JavaScript quick start
                • JavaScript image and video upload
                • JavaScript image transformations
                • JavaScript video transformations
                • JavaScript sample projects
                • JavaScript video tutorials
                • JavaScript SDK reference
                • Transformation Builder reference
              • Next.js SDK
                • Next.js introduction
                • Next.js Starter Kit
                • Next.js quick start
                • Next.js image and video upload
                • Next.js image transformations
                • Next.js video transformations
                • Next.js sample projects
                • Next.js video tutorials
              • jQuery SDK
                • jQuery introduction
                • jQuery image and video upload
                • jQuery image transformations
                • jQuery video transformations
              • React SDK (Legacy)
                • React introduction
                • React image and video upload
                • React image transformations
                • React video transformations
                • React migration guide
              • Vue.js SDK (Legacy)
                • Vue.js introduction
                • Vue.js image and video upload
                • Vue.js image transformations
                • Vue.js video transformations
                • Vue.js migration guide
              • Angular SDK (Legacy)
                • Angular introduction
                • Angular image and video upload
                • Angular image transformations
                • Angular video transformations
                • Angular migration guide
              • JavaScript SDK (Legacy)
                • JavaScript introduction
                • JavaScript image and video upload
                • JavaScript image transformations
                • JavaScript video transformations
                • JavaScript migration guide
            • Mobile SDKs
              • iOS SDK
                • iOS introduction
                • iOS quick start
                • iOS image and video upload
                • iOS image transformations
                • iOS video transformations
                • iOS video player
                • iOS sample projects
              • Android SDK
                • Android introduction
                • Android quick start
                • Android image and video upload
                • Android image transformations
                • Android video transformations
                • Android video player
                • Android sample projects
              • Flutter SDK
                • Flutter introduction
                • Flutter quick start
                • Flutter image and video upload
                • Flutter media transformations
                • Flutter video player
                • Flutter video tutorials
                • Dart-based cloudinary_url_gen package reference
                • Flutter SDK reference
              • React Native SDK
                • React Native introduction
                • React Native image and video upload
                • React Native image transformations
                • React Native video transformations
                • React Native video player
              • Kotlin SDK
                • Kotlin introduction
                • Kotlin media transformations
            • Community-developed libraries
              • Astro
              • Laravel
              • NuxtJS
              • Svelte
              • Gatsby
              • Netlify
              • Drupal
          • Release Notes
            • Latest: October 31, 2026
            • August 31, 2026
            • July 9, 2026
            • Previous releases
              • May 28, 2026
              • April 7, 2026
              • February 28, 2026
              • January 30, 2026
              • 2025
                • December 18, 2025
                • October 31, 2025
                • September 3, 2025
                • July 09, 2025
                • May 27, 2025
              • 2024
                • November 29, 2024
                • October 9, 2024
                • August 12, 2024
                • June 27, 2024
                • May 31, 2024
                • April 16, 2024
                • February 28, 2024
                • January 03, 2024
              • 2023
                • November 13, 2023
                • October 26, 2023
                • September 21, 2023
                • August 15, 2023
                • July 13, 2023
                • June 19, 2023
                • May 16, 2023
                • Apr 04, 2023
                • Feb 21, 2023
              • 2022
                • Dec 27, 2022

          Python sample projects

          Last 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!

          On this page:

          • Basic Python script
          • Django photo album
          • Django form and model helpers
          • Django photo collection app
          • Basic Flask - image uploader and transformer
          • Flask product recommendations
          • Image pre-processing and augmentation
          • App Gallery

          Basic Python script

          The 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.

          Fork the repo and try it yourself
          • Explore the basic Python sample on GitHub.

          Django photo album

          The 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 CloudinaryField within the Photo table of the models.py file, intended for storing Cloudinary URLs in the database. Additionally, the CloudinaryJsFileField is utilized in the forms.py file to capture and transform images uploaded to Cloudinary via a form.

          models.py

          forms.py

          Fork the repo and try it yourself
          • Explore the Django photo album app on GitHub.

          Django form and model helpers

          The 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

          Fork the repo and try it yourself
          • Explore the Django form and model helpers app on GitHub.

          Django photo collection app

          The 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:

          • User authentication: Sign up and log in to create a personalized profile, complete with a bio and profile picture.

          • Lookbook management: Create, edit, and delete your own photo collections (lookbooks).

          • Image customization: Upload and customize images for your lookbooks using Cloudinary’s media management tools.

          • Browse collections: View all available lookbooks, with options to filter by the user who created them.

          • Profile integration: See user profile pictures displayed alongside the lookbooks they’ve created.

          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

          Fork the repo and try it yourself
          • Explore the Django photo collection app on GitHub.
          • Read an article about the Django photo collection app on Hackernoon.
          • Watch YouTube videos showcasing key app features, including user authentication, profile creation, and creating and displaying photo collections.


          Basic Flask - image uploader and transformer

          The 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

          Fork the repo and try it yourself
          • Explore the Flask image uploader and transformer app on GitHub.

          Flask product recommendations

          This 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 /output route for processing a POST request, where it captures user-selected images. It then identifies common themes based on the images' auto-tags and suggests similarly tagged images for further exploration.

          demo.py

          Fork the repo and try it yourself
          • Explore the Flask product recommendation app on GitHub.

          Image pre-processing and augmentation

          This 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

          Fork the repo and try it yourself
          • Explore the image pre-processing and augmentation Jupyter notebook on GitHub.
          • Open the Jupyter notebook.

          App Gallery

          The 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.

          Cloudinary app gallery

          ✔️ Feedback sent!

          ✖️  
          How helpful was this doc page?

          Thanks for submitting your rating. We got it!
          We'd love to hear more. Tell us what you liked and how we can make this page even better:

          *


          Cloudinary is committed to protecting your information security. For details, see our privacy policy.

          For additional assistance, open a support request.

          Error

          Unfortunately there's been an error sending your feedback.

          Rate this page:

          • Python asset management
          • Python video tutorials
          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.