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

Product Metadata Manager

Build a system that manages custom metadata fields for a digital asset management platform. The system should allow defining structured metadata schemas with different field types and maintaining datasources for enumerated values.

Requirements

Metadata Field Management

Create a metadata field manager that supports:

  1. Creating metadata fields with the following types:

    • String fields for text values
    • Enum fields (single-select) using predefined datasources
    • Set fields (multi-select) using predefined datasources
  2. Managing datasources that provide value options for enum and set fields:

    • Create datasources with multiple predefined values
    • Each value should have an external ID and a display label
  3. Updating existing metadata fields:

    • Modify field labels
    • Update datasource associations for enum/set fields
  4. Retrieving metadata field information:

    • Get details about a specific metadata field by its external ID
    • View all configured metadata fields
  5. Cleaning up metadata fields when no longer needed

Implementation Requirements

  • Implement a MetadataFieldManager class that handles all metadata field operations
  • The manager should have methods for creating, updating, retrieving, and deleting metadata fields
  • The manager should handle datasource creation and management
  • Use appropriate error handling for invalid operations

Test Cases

  • Creating a string metadata field returns a successful result with the field's external ID @test
  • Creating an enum field with a datasource containing 3 values successfully stores the field and datasource @test
  • Updating a metadata field's label changes the field information @test
  • Retrieving a metadata field by external ID returns the correct field details @test
  • Deleting a metadata field removes it from the system @test

Implementation

@generates

API

class MetadataFieldManager:
    """Manages custom metadata fields for digital assets."""

    def create_string_field(self, external_id: str, label: str) -> dict:
        """Create a new string-type metadata field.

        Args:
            external_id: Unique identifier for the field
            label: Display label for the field

        Returns:
            dict: Response containing field details
        """
        pass

    def create_enum_field(self, external_id: str, label: str, datasource_values: list) -> dict:
        """Create a new enum (single-select) metadata field with a datasource.

        Args:
            external_id: Unique identifier for the field
            label: Display label for the field
            datasource_values: List of dicts with 'external_id' and 'value' keys

        Returns:
            dict: Response containing field details
        """
        pass

    def create_set_field(self, external_id: str, label: str, datasource_values: list) -> dict:
        """Create a new set (multi-select) metadata field with a datasource.

        Args:
            external_id: Unique identifier for the field
            label: Display label for the field
            datasource_values: List of dicts with 'external_id' and 'value' keys

        Returns:
            dict: Response containing field details
        """
        pass

    def update_field(self, field_external_id: str, label: str) -> dict:
        """Update an existing metadata field.

        Args:
            field_external_id: External ID of the field to update
            label: New label for the field

        Returns:
            dict: Response containing updated field details
        """
        pass

    def get_field(self, field_external_id: str) -> dict:
        """Retrieve details about a specific metadata field.

        Args:
            field_external_id: External ID of the field

        Returns:
            dict: Field details
        """
        pass

    def list_fields(self) -> dict:
        """List all metadata fields.

        Returns:
            dict: Response containing list of all metadata fields
        """
        pass

    def delete_field(self, field_external_id: str) -> dict:
        """Delete a metadata field.

        Args:
            field_external_id: External ID of the field to delete

        Returns:
            dict: Response confirming deletion
        """
        pass

Dependencies { .dependencies }

cloudinary { .dependency }

Provides cloud-based digital asset management capabilities.