--- id: captcha version: "0.7.1" license: BSD-3-Clause license_treatment: permissive maintenance: aging --- # captcha — A captcha library that generates audio and image CAPTCHAs. License: permissive · Maintenance: aging · Downloads: 392.9K/mo ## What it is and what it does Captcha is a library for generating audio and image CAPTCHAs—challenge-response tests used to verify that a user is human rather than a bot. It provides two separate modules: one for audio CAPTCHAs and one for image CAPTCHAs, each accepting a string to encode and outputting either a WAV file or PNG image. The library depends only on Pillow for image handling and supports Python 3.8 through 3.13. The package is designed for developers building web applications or other systems that need human verification. It allows you to generate CAPTCHA data in memory or write it directly to files, and supports customization through your own voice and font data, though built-in data is available. The library has been in development since 2014 and remains in beta status; it is permissively licensed under BSD-3-Clause. Use it for: - Generate image CAPTCHAs for web form submission to prevent automated bot attacks. - Create audio CAPTCHAs for accessibility compliance when image-based verification alone is insufficient. - Build a custom bot-detection layer by embedding CAPTCHA generation into a web service or API. - Integrate standalone CAPTCHA generation into a security workflow without relying on third-party services. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Generates audio and image CAPTCHAs for use in web applications and security workflows, with support for custom voice and font data. Yes, if you need simple, self-hosted CAPTCHA generation without external service dependencies. The low install friction, permissive license, and broad Python version support make it straightforward to adopt. However, the aging maintenance status (last release over a year ago) and beta classification suggest evaluating whether the feature set meets your needs before committing to production use. No known vulnerabilities. ## Install pip install captcha uv add captcha poetry add captcha ## Installing captcha Before you install: Low friction install with a single runtime dependency (Pillow). The package is aging but actively maintained; the repository shows recent commits and no archived status, though the last release was over a year ago. License in practice: Licensed under BSD-3-Clause, a permissive license that allows commercial and private use with minimal restrictions—suitable for most production deployments. Quickstart: pip install captcha from captcha.audio import AudioCaptcha from captcha.image import ImageCaptcha audio = AudioCaptcha(voicedir='/path/to/voices') image = ImageCaptcha(fonts=['/path/A.ttf', '/path/B.ttf']) data = audio.generate('1234') audio.write('1234', 'out.wav') data = image.generate('1234') image.write('1234', 'out.png') Requires Pillow as a runtime dependency; audio generation requires voice data files and image generation requires font files (built-in data available but custom data recommended). Verify before relying: - Whether built-in voice and font data are sufficient for production use or if custom data is mandatory. - Current performance characteristics and scalability limits for high-volume CAPTCHA generation. - Whether the package supports modern CAPTCHA variants (e.g., reCAPTCHA integration) or only standalone generation. ## Package facts - License: BSD-3-Clause (permissive) - Python support: supports_current - Install friction: low - Maintenance: aging - Downloads: 392.9K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags captcha generation, audio captcha, image captcha, bot protection, challenge-response verification, security verification, human verification, bot-protection, accessibility [View on SkillFed](https://skillfed.io/packages/captcha) · [View on PyPI](https://pypi.org/project/captcha/)