tessl install tessl/github-python--cpython@3.13.0CPython is the reference implementation of the Python programming language providing the core interpreter, runtime system, and comprehensive standard library.
Agent Success
Agent success rate when using this tile
96%
Improvement
Agent success rate improvement when using this tile compared to baseline
1.07x
Baseline
Agent success rate without this tile
90%
Utilities for parsing operational text, redacting sensitive tokens, and filling templated alerts.
YYYY-MM-DD HH:MM:SS LEVEL message [#tag ...] into a list of dictionaries with keys timestamp, level, message, and tags. Tags are the # words appended after the message and appear in output order without the #. Blank lines or non-matching lines are skipped. For example, "2025-02-01 14:45:01 WARN Disk usage at 91% #storage #prod\n2025-02-01 14:45:02 INFO Recovery started" becomes [{"timestamp":"2025-02-01 14:45:01","level":"WARN","message":"Disk usage at 91%","tags":["storage","prod"]},{"timestamp":"2025-02-01 14:45:02","level":"INFO","message":"Recovery started","tags":[]}]. @test[EMAIL], [IP], and [ID16] respectively while leaving surrounding text unchanged. Example: "Contact root@svc.local or 192.168.1.5; card 1234-5678 9012 3456." becomes "Contact [EMAIL] or [IP]; card [ID16]." @test$/${} placeholders in a template string using a provided mapping, leaving unknown placeholders intact and treating $$ as a literal dollar sign. Works across multiple lines. Example with template="Alert: $name\\nSlot: ${slot}\\nNote: $$${note}" and data={"name":"cache","slot":"B1"} yields "Alert: cache\\nSlot: B1\\nNote: $${note}". @test@generates
from typing import List, Dict
def parse_entries(log_text: str) -> List[dict]:
"""Parse timestamped log lines with optional hashtag-style tags into structured dicts."""
def redact_sensitive(text: str) -> str:
"""Replace emails, IPv4 addresses, and 16-digit identifiers with fixed placeholders."""
def fill_template(template: str, data: Dict[str, str]) -> str:
"""Fill $-prefixed placeholders with provided values while leaving unknown fields intact."""Uses the standard library's text processing and pattern-matching features. @satisfied-by