CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/pypi-xxhash

Python binding for xxHash library providing fast non-cryptographic hash algorithms

Overall
score

80%

Evaluation80%

1.03x

Agent success when using this tile

Overview
Eval results
Files

task.mdevals/scenario-1/

Hash Algorithm Discovery Tool

Build a utility module that discovers and reports available hash algorithms in a non-cryptographic hashing library.

Requirements

Your module should provide the following capabilities:

Algorithm Discovery

  • List all available hash algorithms
  • Report the count of available algorithms
  • Return algorithms in alphabetical order

Algorithm Validation

  • Check if a specific algorithm name exists in the available algorithms
  • Return boolean values indicating algorithm availability

Implementation

@generates

API

def list_algorithms():
    """
    Returns a sorted list of all available hash algorithm names.

    Returns:
        list: Sorted list of algorithm name strings
    """
    pass

def count_algorithms():
    """
    Returns the count of available hash algorithms.

    Returns:
        int: Number of available algorithms
    """
    pass

def is_algorithm_available(algorithm_name):
    """
    Checks if a specific algorithm is available.

    Args:
        algorithm_name (str): Name of the algorithm to check

    Returns:
        bool: True if algorithm is available, False otherwise
    """
    pass

Test Cases

  • Calling list_algorithms() returns a list containing at least the algorithms: 'xxh32', 'xxh64', 'xxh3_64', 'xxh3_128' @test
  • Calling count_algorithms() returns an integer value greater than or equal to 4 @test
  • Calling is_algorithm_available('xxh32') returns True @test
  • Calling is_algorithm_available('nonexistent_algo') returns False @test
  • The list returned by list_algorithms() is sorted in alphabetical order @test

Dependencies { .dependencies }

xxhash { .dependency }

Provides fast non-cryptographic hash functions with multiple algorithm variants.

Install with Tessl CLI

npx tessl i tessl/pypi-xxhash

tile.json