tessl install tessl/pypi-gntp@1.0.0Growl Notification Transport Protocol for Python
Agent Success
Agent success rate when using this tile
80%
Improvement
Agent success rate improvement when using this tile compared to baseline
1.25x
Baseline
Agent success rate without this tile
64%
Build a utility that parses raw GNTP protocol messages and extracts key information from them.
Your task is to implement a message parser that can:
The parser should accept a raw GNTP message string and return a structured representation containing:
@generates
def parse_gntp_message(raw_message: str) -> dict:
"""
Parse a raw GNTP protocol message.
Args:
raw_message: Raw GNTP message string
Returns:
Dictionary containing:
- 'message_type': str (e.g., 'REGISTER', 'NOTICE', 'OK', 'ERROR')
- 'headers': dict of header key-value pairs
- 'resources': list of binary resources (if any)
Raises:
ValueError: If the message format is invalid
"""
passProvides GNTP protocol implementation for parsing messages.