Skip to main content

A captcha library that generates audio and image CAPTCHAs.

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

captcha-0.7.1.tar.gz (226.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

captcha-0.7.1-py3-none-any.whl (147.6 kB view details)

Uploaded Python 3

File details

Details for the file captcha-0.7.1.tar.gz.

File metadata

  • Download URL: captcha-0.7.1.tar.gz
  • Upload date:
  • Size: 226.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for captcha-0.7.1.tar.gz
Algorithm Hash digest
SHA256 a1b462bcc633a64d8db5efa7754548a877c698d98f87716c620a707364cabd6b
MD5 f890dcca752b1baa0c3d22c4d15e10a9
BLAKE2b-256 b4658e186bb798f33ba390eab897c995b0fcee92bc030e0f40cb8ea01f34dd07

See more details on using hashes here.

Provenance

The following attestation bundles were made for captcha-0.7.1.tar.gz:

Publisher: pypi.yml on lepture/captcha

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file captcha-0.7.1-py3-none-any.whl.

File metadata

  • Download URL: captcha-0.7.1-py3-none-any.whl
  • Upload date:
  • Size: 147.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for captcha-0.7.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8b73b5aba841ad1e5bdb856205bf5f09560b728ee890eb9dae42901219c8c599
MD5 e66b8c1222705b7eb029080a397b637b
BLAKE2b-256 daff3f0982ecd37c2d6a7266c22e7ea2e47d0773fe449984184c5316459d2776

See more details on using hashes here.

Provenance

The following attestation bundles were made for captcha-0.7.1-py3-none-any.whl:

Publisher: pypi.yml on lepture/captcha

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page