tessl install tessl/pypi-cloudinary@1.44.0Python 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%
A utility that generates multiple image URLs with different quality settings to help users find the optimal balance between file size and visual quality for their web applications.
generate_quality_url("sample", 85) returns a URL containing the quality parameter q_85 @testgenerate_quality_url("photo", 100) returns a URL containing the quality parameter q_100 @testgenerate_quality_url("image", 50) returns a URL containing the quality parameter q_50 @testgenerate_quality_url("sample", "auto") returns a URL containing the quality parameter q_auto @testgenerate_quality_url("sample", "auto:good") returns a URL containing the quality parameter q_auto:good @testgenerate_quality_url("sample", "auto:best") returns a URL containing the quality parameter q_auto:best @testgenerate_quality_url("sample", "auto:eco") returns a URL containing the quality parameter q_auto:eco @testgenerate_quality_url("sample", "auto", width=800, crop="fill") returns a URL with both quality and transformation parameters @testcompare_quality_settings("sample", [75, "auto", "auto:best"]) returns a dict with three URLs, each with different quality settings @test@generates
def generate_quality_url(public_id, quality, **transformations):
"""
Generate a Cloudinary URL for an image with specified quality settings.
Args:
public_id (str): The public ID of the image on Cloudinary
quality (int|str): Quality setting - can be integer (1-100) or string
('auto', 'auto:good', 'auto:best', 'auto:eco', 'auto:low')
**transformations: Additional transformation parameters (e.g., width, height,
crop, format, etc.)
Returns:
str: The generated Cloudinary URL with quality transformations
"""
pass
def compare_quality_settings(public_id, quality_values, **base_transformations):
"""
Generate multiple URLs for the same image with different quality settings.
Args:
public_id (str): The public ID of the image on Cloudinary
quality_values (list): List of quality values to compare (can be integers
and/or strings)
**base_transformations: Base transformation parameters to apply to all URLs
Returns:
dict: Dictionary mapping quality values to their respective URLs
"""
passProvides image transformation and URL generation capabilities.
@satisfied-by