Skip to main content

A captcha library that generates audio and image CAPTCHAs.

Features

  1. Audio CAPTCHAs

  2. Image CAPTCHAs

Installation

Install captcha with pip:

$ pip install captcha

Usage

Audio and Image CAPTCHAs are in separated modules:

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')

This is the APIs for your daily works. We do have built-in voice data and font data. But it is suggested that you use your own voice and font data.

License

Licensed under BSD. Please see LICENSE for licensing details.

Metadata

Release files for captcha 0.7.1

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

Source distribution (sdist)

Source distribution for captcha 0.7.1
File Size Uploaded
captcha-0.7.1.tar.gz 226.6 kB Details

Built distribution (wheel)

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

Total release size: 374.2 kB

Release files / captcha-0.7.1.tar.gz

Download URL captcha-0.7.1.tar.gz
Size 226.6 kB
Tags Source
SHA-256 checksum
How to use checksums
a1b462bcc633a64d8db5efa7754548a877c698d98f87716c620a707364cabd6b
BLAKE2b-256 checksum
How to use checksums
b4658e186bb798f33ba390eab897c995b0fcee92bc030e0f40cb8ea01f34dd07
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 1, 2025.

Transparency log

Release files / captcha-0.7.1-py3-none-any.whl

Download URL captcha-0.7.1-py3-none-any.whl
Size 147.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8b73b5aba841ad1e5bdb856205bf5f09560b728ee890eb9dae42901219c8c599
BLAKE2b-256 checksum
How to use checksums
daff3f0982ecd37c2d6a7266c22e7ea2e47d0773fe449984184c5316459d2776
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 1, 2025.

Transparency log

Release history Release notifications | RSS feed

This release

0.7.1 This release

2 release files

0.7.0

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4

2 release files

0.3

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2

2 release files

0.1.1

1 release file

0.1

1 release file

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