tessl install tessl/pypi-azure-data-tables@12.7.0Microsoft Azure Data Tables Client Library for Python
Agent Success
Agent success rate when using this tile
90%
Improvement
Agent success rate improvement when using this tile compared to baseline
0.97x
Baseline
Agent success rate without this tile
93%
Build a product inventory management system that stores product data with diverse data types including strings, numbers, booleans, timestamps, and binary data.
Create a Python module that manages product inventory records with the following functionality:
Each product record must include:
Provides cloud-based NoSQL data storage with support for diverse data types.
@generates
def add_product(category: str, product_id: str, name: str, price: float,
quantity: int, is_active: bool, last_restocked,
image_data: bytes, product_uuid) -> None:
"""
Add a new product to the inventory.
Args:
category: Product category (used as partition key)
product_id: Unique product identifier (used as row key)
name: Product name
price: Product price (floating-point)
quantity: Quantity in stock (integer)
is_active: Whether product is active (boolean)
last_restocked: Last restock datetime
image_data: Product image as binary data
product_uuid: Product UUID (GUID)
"""
pass
def get_product(category: str, product_id: str) -> dict:
"""
Retrieve a product by category and product ID.
Args:
category: Product category
product_id: Product identifier
Returns:
Dictionary containing product data with all fields
"""
pass
def update_product(category: str, product_id: str, **updates) -> None:
"""
Update a product's fields.
Args:
category: Product category
product_id: Product identifier
**updates: Fields to update as keyword arguments
"""
pass
def query_products_by_category(category: str) -> list:
"""
Query all products in a specific category.
Args:
category: Product category to filter by
Returns:
List of product dictionaries
"""
pass