A captcha library that generates audio and image CAPTCHAs.
Features
Audio CAPTCHAs
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.
Useful Links
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)
| File | Size | Uploaded | |
|---|---|---|---|
| captcha-0.7.1.tar.gz | 226.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| 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 logRelease 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