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

Lightweight QR Code Generator

Overview

Create a utility that generates QR codes without requiring the Pillow/PIL image library. The tool should output standard PNG files that can be viewed and scanned on any device.

Requirements

Your implementation must:

  1. Generate QR codes as PNG files without using PIL/Pillow
  2. Accept text data as input and encode it into a QR code
  3. Support configurable QR code size and border width
  4. Handle medium error correction level
  5. Save the output to a specified file path

Constraints

  • Must not depend on PIL/Pillow for image generation
  • Output must be valid PNG files
  • QR codes must be scannable by standard QR readers
  • Use greyscale 1-bit format for the output

Dependencies { .dependencies }

qrcode { .dependency }

Python QR code generation library with multiple output format support.

pypng { .dependency }

Pure Python PNG encoder and decoder library.

Test Cases

Test Case 1: Basic QR Code Generation { @test }

File: test_qr_generator.py

Description: Generate a QR code with default settings

Input:

  • Data: "Hello, World!"
  • Output file: "test_output.png"

Expected Behavior:

  • A PNG file is created at the specified path
  • The file can be opened as a valid PNG image
  • The QR code encodes the text "Hello, World!"
  • No PIL/Pillow libraries are used in the process

Test Case 2: Custom Size and Border { @test }

File: test_qr_generator.py

Description: Generate a QR code with custom dimensions

Input:

  • Data: "https://example.com"
  • Output file: "custom_qr.png"
  • Box size: 15 pixels per module
  • Border: 2 modules

Expected Behavior:

  • A PNG file is created with larger modules (15 pixels each)
  • The border is 2 modules wide instead of the default
  • The QR code correctly encodes the URL
  • File is a valid PNG that can be scanned

Test Case 3: Longer Data { @test }

File: test_qr_generator.py

Description: Generate a QR code with more complex data

Input:

  • Data: "The quick brown fox jumps over the lazy dog. Pack my box with five dozen liquor jugs."
  • Output file: "long_data_qr.png"

Expected Behavior:

  • The QR code automatically adjusts to accommodate the longer text
  • Output is a valid, scannable PNG file
  • No errors occur due to data length

Install with Tessl CLI

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

tile.json