or run

tessl search
Log in

Version

Workspace
tessl
Visibility
Public
Created
Last updated
Describes

pkg:github/python/cpython@v3.13.2

tile.json

tessl/github-python--cpython

tessl install tessl/github-python--cpython@3.13.0

CPython 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%

task.mdevals/scenario-2/

Incident Text Toolkit

Utilities for parsing operational text, redacting sensitive tokens, and filling templated alerts.

Capabilities

Parse timestamped entries

  • Turns multi-line input where each valid line follows 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

Redact sensitive tokens

  • Replaces every email address, IPv4 address, and 16-digit identifier (optionally spaced or dashed every 4 digits) with [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

Safe template fill

  • Fills $/${} 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

Implementation

@generates

API

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."""

Dependencies { .dependencies }

CPython text processing stdlib { .dependency }

Uses the standard library's text processing and pattern-matching features. @satisfied-by