CtrlK
CommunityDocumentationLog inGet started
Tessl Logo

tessl/pypi-qrcode

QR Code image generator with customizable image formats, error correction levels, and styling options

42%

Overall

Evaluation42%

0.86x

Agent success when using this tile

Overview
Eval results
Files

task.mdevals/scenario-8/

Dynamic QR Code Generator with Optimal Sizing

Build a QR code generation utility that automatically handles variable-length input data by selecting the optimal QR code size.

Requirements

Your system should generate QR codes that automatically adjust their size based on the amount of data being encoded. The system must efficiently handle both short and long data inputs without requiring manual version selection.

Core Functionality

Implement a function that:

  • Accepts text data of any length as input
  • Generates a QR code image that is automatically sized to fit the data
  • Saves the generated QR code to a specified output file path
  • Uses medium error correction level for reliability

Size Optimization

The system must:

  • Automatically determine the minimum QR code version needed for the input data
  • Handle data ranging from short URLs (10-20 characters) to longer text (200+ characters)
  • Start the version search from version 1 to ensure the smallest possible code

Test Cases

  • Given the text "https://example.com", the function generates a valid QR code image saved to the specified path @test
  • Given a 250-character text string, the function generates a valid QR code image without raising errors @test
  • The generated QR code file exists and is a valid image file @test

Implementation

@generates

API

def generate_qr_code(data: str, output_path: str) -> None:
    """
    Generate a QR code image that automatically adjusts size based on data length.

    Args:
        data: The text data to encode in the QR code
        output_path: File path where the QR code image should be saved

    Returns:
        None
    """
    pass

Dependencies { .dependencies }

qrcode { .dependency }

Provides QR code generation support.

Install with Tessl CLI

npx tessl i tessl/pypi-qrcode@7.4.0
What are skills?

tile.json