tessl install tessl/pypi-aenum@3.1.0Advanced Enumerations (compatible with Python's stdlib Enum), NamedTuples, and NamedConstants
Agent Success
Agent success rate when using this tile
76%
Improvement
Agent success rate improvement when using this tile compared to baseline
1.21x
Baseline
Agent success rate without this tile
63%
Design a tuple-backed data structure for telemetry readings with strict field control, alias-friendly accessors, and validation suitable for small device payloads.
(device_id, state, temp_c, humidity_percent) yields an object of length 4 whose iteration/unpacking returns those values in that order. @testid returns the same value as device_id, and status returns the same value as state; these aliases do not change the tuple length or order. @testdiagnostics attribute as a tuple in the order provided. @teststate is not "ok" or "alert", or when humidity_percent falls outside 0–100, before a reading is returned. @test@generates
class TelemetryReading(tuple):
device_id: str
id: str # alias for device_id
state: str
status: str # alias for state
temp_c: float
humidity_percent: float
diagnostics: tuple[str, ...]
def __new__(
cls,
device_id: str,
state: str,
temp_c: float,
humidity_percent: float,
*diagnostics: str,
) -> "TelemetryReading": ...Provides enhanced enum and tuple helpers used to enforce tuple sizing, aliases, ordering, and value review logic.