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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: captcha-0.5.0.tar.gz
  • Upload date:
  • Size: 120.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for captcha-0.5.0.tar.gz
Algorithm Hash digest
SHA256 132cb5b9aafd1586bfa421c19f994f7b482873e7f981f80fff888954e02c35c8
MD5 ecf1995f183d7de5531ea71346321c34
BLAKE2b-256 9de8f41cd8879c3368fbc7297b463674d5d6439a80c61e089dbcee195c143fb7

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for captcha-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9c86fdc6d453e1b41c330d07c1600e07217557a3e64f8307efe20ef4766eb46a
MD5 9f02605166dc0eedeeb61ca6795bd40d
BLAKE2b-256 e6ff5b2abf00f09e56ffae3bfa4cdc85873ac9c59ee13603542214e948a10d2f

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