lepture

captcha: Generate Image and Audio CAPTCHAs

captcha is a Python library for generating image and audio CAPTCHAs, with built-in voice and font data and support for custom assets. It suits applications that need to create their own CAPTCHA challenges and save them as image or audio files.

View on GitHub Compare
Stars
1.1k
Forks
189
Stars, last 30 days
+0

Our take

Health score

25/100

How it is scored
Activity
19
Community
40
Issues
21
Pull requests
20

+0 stars in the last 30 days

Project history

Daily GitHub snapshots since Oct 7, 2026. History covers stars and forks; health signals are not tracked historically.

Selected snapshot

Stars

1,098

Forks

188

Change since Nov 17, 2026: 0 stars·0 forks

Overview

captcha is a Python library for producing visual and audio CAPTCHA challenges. It gives application developers a way to generate challenge media in their own code rather than relying on a hosted CAPTCHA service.

The project offers separate image and audio modules. It can use bundled assets, while the maintainers suggest supplying custom fonts and voice data for practical use. See the official repository and documentation for details.

Key Features

  • Generate image CAPTCHA data or write challenges to PNG files.
  • Generate audio CAPTCHA data or write challenges to WAV files.
  • Use separate ImageCaptcha and AudioCaptcha interfaces.
  • Provide custom font files for image rendering.
  • Provide a custom voice-data directory for audio generation.
  • Set foreground and background colors for image challenges.

Use Cases

  • Python web application developers can create image challenges as part of a form or signup flow.
  • Projects that need an audio alternative can generate audio CAPTCHA output alongside visual challenges.
  • Applications with a distinct visual identity can use their own fonts and colors when rendering challenges.
  • Developers who need generated CAPTCHA media as files can write image and audio outputs for use by other parts of their application.

Getting Started

Install from PyPI:

pip install captcha

See the README for usage examples and configuration details.

Considerations

  • The library generates challenge media; the input does not describe a hosted verification service or an application-level validation flow.
  • The README recommends using your own voice and font data, so deployments may need to source and configure suitable assets.
  • The repository is not archived and is licensed under BSD-3-Clause. Consult the official documentation for current requirements and usage details.

Found this useful?

Share it with someone who would like captcha.