tessl install tessl/pypi-modal@1.1.0Python client library for Modal, a serverless cloud computing platform that enables developers to run Python code in the cloud with on-demand access to compute resources.
Agent Success
Agent success rate when using this tile
85%
Improvement
Agent success rate improvement when using this tile compared to baseline
1.6x
Baseline
Agent success rate without this tile
53%
Build a serverless image thumbnail generation service that processes multiple images in parallel and tracks processing results.
@generates
def generate_thumbnail(image_url: str) -> bytes:
"""
Generate a thumbnail for a single image.
Args:
image_url: URL pointing to an image to process
Returns:
Thumbnail image as bytes (200x200 PNG)
Raises:
ValueError: If image_url is invalid or image cannot be processed
"""
pass
def process_images_parallel(image_urls: list[str]) -> dict[str, bytes]:
"""
Process multiple images in parallel and generate thumbnails.
Args:
image_urls: List of URLs pointing to images to process
Returns:
Dictionary mapping image URLs to thumbnail bytes
Raises:
ValueError: If image_urls is empty
"""
pass
def generate_thumbnail_async(image_url: str) -> str:
"""
Asynchronously generate a thumbnail without waiting for completion.
Args:
image_url: URL pointing to an image to process
Returns:
Function call ID for tracking the async execution
"""
pass
def get_cached_thumbnail(image_url: str) -> bytes | None:
"""
Retrieve a cached thumbnail if it exists.
Args:
image_url: URL of the image to look up
Returns:
Cached thumbnail bytes or None if not found
"""
passProvides serverless compute infrastructure for parallel execution.
Python imaging library for image processing operations.