Skip to main content

CaptchaGenerator 2.0.0

Tests Package Python License

Fast, modular CAPTCHA generation for Python with 26 ready-to-use challenges.

Documentation · Examples · Release 2.0.0

Install

pip install CaptchaGenerator

Audio support:

pip install "CaptchaGenerator[audio]"

Quick Start

from CaptchaGenerator import CaptchaConfig, TextCaptcha

config = CaptchaConfig(width=720, height=240, random_seed=42)

answer = TextCaptcha(config).generate(
    number_gen=6,
    values_captcha="ABCDEFGHJKLMNPQRSTUVWXYZ23456789",
    name_export="captcha",
    path_export="./output",
    fonts=[],
    colors=["navy", "darkred"],
    backgrounds=[],
    difficulty="medium",
    style="modern",
)

print(answer)

Included CAPTCHAs

  • Text: text, random text, words and missing characters
  • Logic: math, sequences, custom questions and visual logic
  • Images: grids, rotation, direction, upside-down objects and click points
  • Puzzles: sliders, irregular pieces, patterns and mazes
  • Visual: clocks, colors, shapes, odd-one-out and 3D perspective
  • Media: animated and audio CAPTCHA

All generators are available through CaptchaGenerator.SUPPORTED_CAPTCHAS.

Customization

Use CaptchaConfig to control dimensions, colors, fonts, output format, quality, accessibility text, random seed and render hooks.

Visual challenges return a ChallengeResult containing:

  • path - generated image
  • answer - expected answer; keep it server-side
  • prompt - user instruction
  • metadata - integration data
  • accessibility_text - accessible description

Examples

Each CAPTCHA has standalone simple and Tkinter examples:

Examples/CaptchaExamples/<CaptchaName>/
  simple.py
  interactive.py

Security

Never expose answers, target coordinates or puzzle solutions to an untrusted client. Validate responses on the server.

License

MIT

Metadata

Release files for CaptchaGenerator 2.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for CaptchaGenerator 2.0.0
File Size Uploaded
captchagenerator-2.0.0.tar.gz 51.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for CaptchaGenerator 2.0.0
File Interpreter ABI Platform
captchagenerator-2.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 98.1 kB

Release files / captchagenerator-2.0.0.tar.gz

Download URL captchagenerator-2.0.0.tar.gz
Size 51.7 kB
Tags Source
SHA-256 checksum
How to use checksums
3d8ae46ab2f242b6d06703c8c8e8610bff96a039582882b302258d9137d1511e
BLAKE2b-256 checksum
How to use checksums
187c757d7c143656a3d91c1cf6665a5a4388b957f63c6bbd39c19737efc30db2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.9

Release files / captchagenerator-2.0.0-py3-none-any.whl

Download URL captchagenerator-2.0.0-py3-none-any.whl
Size 46.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e260f0a83a4b49ca923aa87e606bea9762c3f0d7cb0d33391877386f0d2a17c0
BLAKE2b-256 checksum
How to use checksums
5c82cea7c1c7d2af72c766c14602317a001782ad1f948370a212d49fe87cf308
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.9

Release history Release notifications | RSS feed

This release

2.0.0 This release

2 release files

1.1.6

2 release files

1.1.5

1 release file

1.1.4

2 release files

1.1.3

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page