Growl Notification Transport Protocol for Python
80
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.
Install with Tessl CLI
npx tessl i tessl/pypi-gntpevals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10