CtrlK
CommunityDocumentationLog inGet started
Tessl Logo

tessl/pypi-gntp

tessl install tessl/pypi-gntp@1.0.0

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

task.mdevals/scenario-6/

GNTP Message Parser

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.

Capabilities

Parse Registration Messages

  • Given raw GNTP registration data, it extracts and returns the application name @test
  • Given raw GNTP registration data with notification types, it returns the count of registered notifications @test

Parse Notification Messages

  • Given raw GNTP notification data, it extracts and returns the notification title @test

Parse Response Messages

  • Given a GNTP OK response, it identifies the response as successful @test
  • Given a GNTP Error response, it extracts the error code and description @test

Parse Password-Protected Messages

  • Given password-protected GNTP registration data with the correct password, it successfully parses and returns the application name @test

Implementation

@generates

API

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

Dependencies { .dependencies }

gntp { .dependency }

Provides GNTP protocol implementation and message parsing.

@satisfied-by

Version

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
pypipkg:pypi/gntp@1.0.x
tile.json