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

Digital Asset Organizer

Build a Python application that organizes digital assets (images and videos) into a structured folder hierarchy in your cloud storage.

Requirements

Your application should implement folder-based organization for digital assets with the following capabilities:

Folder Structure Management

Create a system that can:

  • Upload assets to specific folders in the cloud storage
  • Organize assets into nested folder hierarchies (e.g., projects/2024/campaign-photos)
  • List all root folders and their subfolders
  • Create new folder structures programmatically

Asset Organization

The system should:

  • Accept a local file path and a target folder path where the asset should be stored
  • Upload the asset to the specified folder location
  • Return the public identifier of the uploaded asset (which includes the folder path)

Folder Operations

Implement the following operations:

  • List folders: Retrieve all root folders and optionally list subfolders within a specific folder
  • Create folders: Create new folders by uploading assets with folder paths (folders are created automatically when assets are placed in them)
  • Folder cleanup: Remove empty folders that no longer contain any assets

Implementation Files

@generates

The main module should be implemented in asset_organizer.py.

API

def upload_to_folder(file_path: str, folder_path: str) -> dict:
    """
    Upload an asset to a specific folder path in cloud storage.

    Args:
        file_path: Local path to the file to upload
        folder_path: Target folder path (e.g., 'projects/2024/photos')

    Returns:
        Dictionary containing upload result including public_id with folder path
    """
    pass

def list_root_folders() -> list:
    """
    List all root folders in cloud storage.

    Returns:
        List of folder dictionaries containing name and path information
    """
    pass

def list_subfolders(folder_path: str) -> list:
    """
    List subfolders within a specific folder.

    Args:
        folder_path: Path to the parent folder

    Returns:
        List of subfolder dictionaries
    """
    pass

def delete_empty_folder(folder_path: str) -> dict:
    """
    Delete an empty folder from cloud storage.

    Args:
        folder_path: Path to the folder to delete

    Returns:
        Dictionary with deletion result
    """
    pass

Test Cases

  • Uploading an asset with folder path events/2024/conference should place the asset in that nested folder structure @test
  • Listing root folders should return all top-level folders in the cloud storage @test
  • Listing subfolders of events/2024 should return folders like conference, workshop, etc. @test
  • Deleting an empty folder temp/uploads should succeed when no assets exist in that folder @test

Dependencies { .dependencies }

cloudinary { .dependency }

Provides cloud-based image and video management with folder organization capabilities.