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
Quality
Pending
Does it follow best practices?
Impact
83%
1.09xAverage score across 10 eval scenarios
Build a media asset lifecycle management system that creates, configures, and manages media assets in Azure Media Services.
Your system must implement the following capabilities:
Create a new media asset with proper configuration:
Generate secure upload URLs for media files:
Retrieve and filter assets from the Media Services account:
Get detailed information about a specific asset:
@generates
from typing import Optional, List, Dict, Any
from datetime import datetime
class MediaAssetManager:
"""
Manages media asset lifecycle operations in Azure Media Services.
"""
def __init__(self, client, resource_group: str, account_name: str):
"""
Initialize the asset manager.
Args:
client: Azure Media Services client instance
resource_group: Azure resource group name
account_name: Media Services account name
"""
pass
def create_asset(
self,
asset_name: str,
description: Optional[str] = None,
alternate_id: Optional[str] = None,
storage_account_name: Optional[str] = None
) -> Any:
"""
Create a new media asset.
Args:
asset_name: Unique name for the asset
description: Optional description of the asset
alternate_id: Optional alternate ID for external reference
storage_account_name: Optional storage account name
Returns:
The created asset object
"""
pass
def get_upload_url(self, asset_name: str, expiry_hours: int = 1) -> Dict[str, str]:
"""
Generate a SAS URL for uploading content to an asset.
Args:
asset_name: Name of the asset
expiry_hours: Hours until the SAS token expires (default: 1)
Returns:
Dictionary containing 'container' and 'sas_url' keys
"""
pass
def list_assets(
self,
order_by: Optional[str] = None,
filter_query: Optional[str] = None
) -> List[Any]:
"""
List assets with optional filtering and ordering.
Args:
order_by: Optional ordering (e.g., "properties/created asc")
filter_query: Optional OData filter query
Returns:
List of asset objects
"""
pass
def get_asset(self, asset_name: str) -> Any:
"""
Retrieve a specific asset by name.
Args:
asset_name: Name of the asset to retrieve
Returns:
The asset object if found
"""
passProvides Azure Media Services management capabilities for creating and managing media assets.
Install with Tessl CLI
npx tessl i tessl/pypi-azure-mgmt-mediadocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10