or run

tessl search
Log in

Version

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
pypipkg:pypi/cloudinary@1.44.x
tile.json

tessl/pypi-cloudinary

tessl install tessl/pypi-cloudinary@1.44.0

Python and Django SDK for Cloudinary, a cloud-based image and video management service with comprehensive transformation, optimization, and delivery capabilities

Agent Success

Agent success rate when using this tile

94%

Improvement

Agent success rate improvement when using this tile compared to baseline

1.08x

Baseline

Agent success rate without this tile

87%

task.mdevals/scenario-8/

Product Image Gallery Generator

Build a tool that generates optimized product images for an e-commerce platform. The tool should apply multiple sequential transformations to create product thumbnails with specific visual treatments.

Requirements

Your implementation should accept a product image and generate a URL that applies the following transformations in sequence:

  1. First transformation step: Resize the image to 800x800 pixels using a fit crop mode with automatic gravity, and convert to WebP format
  2. Second transformation step: Apply a 5-pixel rounded corner effect and add a 2-pixel solid border in light gray (#CCCCCC)
  3. Third transformation step: Add a semi-transparent watermark overlay in the bottom-right corner

The transformations must be applied sequentially, where each step builds upon the previous one.

Implementation

@generates

API

def generate_product_thumbnail(public_id: str, watermark_text: str) -> str:
    """
    Generate a product thumbnail URL with sequential transformations.

    Args:
        public_id: The Cloudinary public ID of the product image
        watermark_text: Text to display as watermark overlay

    Returns:
        A Cloudinary URL string with all transformations applied
    """
    pass

Test Cases

  • Given public_id "products/shoe" and watermark_text "© 2024", generates a URL with three transformation steps separated by forward slashes @test
  • The generated URL includes width and height parameters in the first transformation step @test
  • The generated URL includes a text overlay with the watermark text in the final transformation step @test

Dependencies { .dependencies }

cloudinary { .dependency }

Provides cloud-based image transformation and delivery capabilities.