Growl Notification Transport Protocol for Python
80
A utility that reads and processes GNTP protocol messages. The tool should be able to parse different types of GNTP messages and extract their key information.
@generates
def parse_registration(data):
"""
Parse a GNTP registration message and return application name.
Parameters:
- data (str or bytes): Raw GNTP registration message data
Returns:
str: The application name from the registration
"""
def get_notification_count(data):
"""
Parse a GNTP registration message and return notification count.
Parameters:
- data (str or bytes): Raw GNTP registration message data
Returns:
int: The number of notification types registered
"""
def parse_notification_title(data):
"""
Parse a GNTP notification message and return the title.
Parameters:
- data (str or bytes): Raw GNTP notification message data
Returns:
str: The notification title
"""
def is_success_response(data):
"""
Determine if a GNTP response indicates success.
Parameters:
- data (str or bytes): Raw GNTP response message data
Returns:
bool: True if the response is a GNTPOK message, False otherwise
"""
def parse_error_response(data):
"""
Parse a GNTP error response and return error details.
Parameters:
- data (str or bytes): Raw GNTP error response message data
Returns:
tuple: (error_code, error_description)
"""
def parse_with_password(data, password):
"""
Parse a password-protected GNTP message and return the application name.
Parameters:
- data (str or bytes): Raw GNTP message data
- password (str): Password for authentication
Returns:
str: The application name from the message
"""Provides GNTP protocol implementation and message parsing.
@satisfied-by
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