tessl install tessl/pypi-frozendict@2.4.0A simple immutable dictionary implementation with hashing support and performance optimizations
Agent Success
Agent success rate when using this tile
85%
Improvement
Agent success rate improvement when using this tile compared to baseline
1.31x
Baseline
Agent success rate without this tile
65%
A configuration management system that works across Python 3.6+ using frozendict for immutable configuration storage.
Load configuration from a dictionary and store it as an immutable frozendict that works across Python 3.6+.
{"host": "localhost", "port": 8080} creates an immutable frozendict config @testIterate over configuration keys in both forward and reverse order, with proper fallback for older Python versions.
["host", "port", "timeout"] yields keys in insertion order @test["host", "port", "timeout"] yields ["timeout", "port", "host"] @testVerify that configurations are properly immutable and handle type checking gracefully across Python versions.
@generates
from frozendict import frozendict
from typing import Dict, Any, Iterator
def load_config(config_dict: Dict[str, Any]) -> frozendict:
"""
Load a configuration dictionary into an immutable frozendict.
Args:
config_dict: A dictionary containing configuration key-value pairs
Returns:
An immutable frozendict containing the configuration
"""
pass
def iterate_config(config: frozendict) -> Iterator[str]:
"""
Iterate over configuration keys in forward order.
Args:
config: A frozendict configuration object
Yields:
Configuration keys in insertion order
"""
pass
def reverse_iterate_config(config: frozendict) -> Iterator[str]:
"""
Iterate over configuration keys in reverse order.
Falls back to list reversal on Python < 3.8.
Args:
config: A frozendict configuration object
Yields:
Configuration keys in reverse insertion order
"""
pass
def is_immutable_mapping(config: frozendict) -> bool:
"""
Check if config is an immutable Mapping using collections.abc.
Args:
config: A frozendict configuration object
Returns:
True if config is a Mapping instance
"""
passProvides immutable dictionary implementation with cross-version Python support.
@satisfied-by