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-1/

Custom Image Transformation Service

Build a Python service that applies custom transformations to images using remote functions and WebAssembly filters.

Requirements

Implement three functions to handle image uploads and custom transformations:

Image Upload

Create a function upload_image(file_path, public_id) that:

  • Uploads an image file to cloud storage
  • Returns the upload result dictionary

Remote Function Transformation

Create a function apply_remote_function(public_id, function_url) that:

  • Applies a custom transformation using a remote function
  • The function_url parameter is the URL of the remote function endpoint
  • Returns the transformation URL for the processed image

Example: If function_url is "https://example.com/sepia-filter", the function should generate a URL that applies this remote function to the image.

WASM Transformation

Create a function apply_wasm_function(public_id, wasm_id) that:

  • Applies a WebAssembly custom function to transform the image
  • The wasm_id parameter identifies the WASM function to use
  • Returns the transformation URL for the processed image

Implementation

@generates

API

def upload_image(file_path: str, public_id: str) -> dict:
    """
    Upload an image to cloud storage.

    Args:
        file_path: Path to the local image file
        public_id: Unique identifier for the uploaded image

    Returns:
        Dictionary containing upload result
    """
    pass

def apply_remote_function(public_id: str, function_url: str) -> str:
    """
    Apply a custom remote function transformation to an image.

    Args:
        public_id: The public ID of the uploaded image
        function_url: URL of the remote function endpoint

    Returns:
        URL string for the transformed image
    """
    pass

def apply_wasm_function(public_id: str, wasm_id: str) -> str:
    """
    Apply a WebAssembly custom function to an image.

    Args:
        public_id: The public ID of the uploaded image
        wasm_id: Identifier of the WASM function

    Returns:
        URL string for the transformed image
    """
    pass

Test Cases

  • Uploading an image with public_id "test_image" successfully returns a result with the public_id field set to "test_image" @test
  • Applying a remote function with URL "https://example.com/sepia" to public_id "sample" returns a valid transformation URL @test
  • Applying a WASM function with ID "blur_filter" to public_id "photo" returns a valid transformation URL @test

Dependencies { .dependencies }

cloudinary { .dependency }

Provides cloud-based image and video management with transformation capabilities including custom functions.