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-5/

QR Code Image Generator with Custom Styling

Create a QR code image generator that produces styled QR codes with custom visual appearance.

Requirements

Implement a module that generates QR codes with the following capabilities:

Basic Image Generation

Create QR codes that can be saved as image files. The generator should:

  • Accept text data as input
  • Configure error correction level to high (maximum recovery capability)
  • Generate images with a border of 5 modules
  • Use a box size of 10 pixels per module

Custom Color Styling

Support custom color schemes for the generated QR codes:

  • Allow specification of foreground (fill) color for QR modules
  • Allow specification of background color
  • Colors should be provided as color names (e.g., "darkblue", "white")

Multiple Output Formats

Generate QR codes in different image formats:

  • Standard PIL-based PNG images with custom colors

  • SVG path-based output for scalable vector graphics

  • When encoding "Hello World" with dark blue foreground and white background, the resulting image should be scannable and contain the correct data @test

  • When generating an SVG for "Test123", the output should be an SVG image object that can be saved @test

  • When creating a QR code with high error correction and a border of 5, the resulting image should have the specified border width @test

Implementation

@generates

API

def generate_styled_qr(data: str, fill_color: str = "black", back_color: str = "white") -> object:
    """
    Generate a styled QR code with custom colors.

    Args:
        data: The text data to encode in the QR code
        fill_color: Color for the QR code modules (default: "black")
        back_color: Color for the background (default: "white")

    Returns:
        A PIL Image object containing the styled QR code
    """
    pass

def generate_svg_qr(data: str) -> object:
    """
    Generate an SVG QR code.

    Args:
        data: The text data to encode in the QR code

    Returns:
        An SVG image object
    """
    pass

Dependencies { .dependencies }

qrcode { .dependency }

Provides QR code generation functionality with support for various image formats and styling options.

@satisfied-by

Install with Tessl CLI

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

tile.json