CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/pypi-azure-mgmt-media

Microsoft Azure Media Services Client Library for Python - A management library for Azure Media Services that provides programmatic access to media processing and streaming capabilities in the cloud.

83

1.09x

Quality

Pending

Does it follow best practices?

Impact

83%

1.09x

Average score across 10 eval scenarios

Overview
Eval results
Files

task.mdevals/scenario-3/

Azure Media Services Account Provisioning Tool

A command-line tool for provisioning and managing Azure Media Services accounts with automated setup and validation.

Capabilities

Account Name Validation

Before creating resources, the tool validates that the desired account name is available in the Azure subscription.

  • When checking if the account name "validmedia123" is available in location "eastus", the tool returns True if available @test
  • When checking if an already-taken account name is available, the tool returns False @test

Account Creation

Creates a new Azure Media Services account with specified configuration in a resource group.

  • Given a resource group "rg-media-test", account name "testmedia456", and location "westus", the tool creates the account successfully and returns the account resource @test
  • When creating an account with a storage account configuration, the account is created with the storage account properly associated @test

Account Retrieval

Retrieves information about an existing Media Services account.

  • Given a resource group "rg-media-prod" and account name "prodmedia789", the tool retrieves the account details including location, storage accounts, and resource ID @test

Storage Account Configuration

Updates the storage accounts associated with a Media Services account.

  • Given an existing account, when adding a new storage account, the account is updated to include both the original and new storage account @test

Implementation

@generates

API

from azure.mgmt.media import AzureMediaServices
from azure.identity import DefaultAzureCredential

class MediaAccountManager:
    """Manages Azure Media Services account operations."""

    def __init__(self, subscription_id: str):
        """
        Initialize the Media Account Manager.

        Args:
            subscription_id: Azure subscription ID
        """
        pass

    def check_name_availability(self, location: str, account_name: str) -> bool:
        """
        Check if a Media Services account name is available.

        Args:
            location: Azure region (e.g., 'eastus', 'westus')
            account_name: Desired account name

        Returns:
            True if the name is available, False otherwise
        """
        pass

    def create_account(
        self,
        resource_group: str,
        account_name: str,
        location: str,
        storage_accounts: list = None
    ) -> dict:
        """
        Create a new Media Services account.

        Args:
            resource_group: Name of the resource group
            account_name: Name for the new account
            location: Azure region
            storage_accounts: Optional list of storage account configurations,
                            each as dict with 'id' and 'type' keys

        Returns:
            Dictionary containing account details (name, location, id)
        """
        pass

    def get_account(self, resource_group: str, account_name: str) -> dict:
        """
        Retrieve details of an existing Media Services account.

        Args:
            resource_group: Name of the resource group
            account_name: Name of the account

        Returns:
            Dictionary containing account details including storage accounts
        """
        pass

    def update_storage_accounts(
        self,
        resource_group: str,
        account_name: str,
        storage_accounts: list
    ) -> dict:
        """
        Update storage accounts associated with a Media Services account.

        Args:
            resource_group: Name of the resource group
            account_name: Name of the account
            storage_accounts: List of storage account configurations

        Returns:
            Updated account details
        """
        pass

Dependencies { .dependencies }

azure-mgmt-media { .dependency }

Provides Azure Media Services management capabilities including account provisioning and configuration.

azure-identity { .dependency }

Provides Azure Active Directory authentication support for accessing Azure services.

Install with Tessl CLI

npx tessl i tessl/pypi-azure-mgmt-media

tile.json