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.6.0.tar.gz (187.6 kB view details)

Uploaded Source

Built Distribution

captcha-0.6.0-py3-none-any.whl (102.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: captcha-0.6.0.tar.gz
  • Upload date:
  • Size: 187.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for captcha-0.6.0.tar.gz
Algorithm Hash digest
SHA256 a5ead7679cd8477bc636524d54f50e092a4b6f3db4e52bb98a689593638d1772
MD5 98d3682c39448ca651e48ddd3fbb6d35
BLAKE2b-256 484c547742298d99408a7172aa5b1328b6bb9d85234b4082e0fd379f9b893615

See more details on using hashes here.

File details

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

File metadata

  • Download URL: captcha-0.6.0-py3-none-any.whl
  • Upload date:
  • Size: 102.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for captcha-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 148b2475be00a067b6173b7796cdc2332dbcb6fd4bfced1055bc8f69846bc924
MD5 a6a494da565c012bc866b1d764052c77
BLAKE2b-256 c0f29af6abd7b07e4709a7d698fee6fa7ce7fb9814886b18de61580311b0fe96

See more details on using hashes here.

Supported by

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