more-captcha - a fork of lepture/captcha with more data, like audio samples for audio captchas : A captcha library that generates audio and image CAPTCHAs. https://git.ari.lt/ari/captcha
Go to file
Ari Archer 9b31c487d9
1.1.0
Signed-off-by: Ari Archer <ari@ari.lt>
2024-06-11 19:17:21 +03:00
.github/workflows chore: add pypi action 2023-07-29 10:44:21 +09:00
docs docs: add og image and og description 2023-07-29 22:45:13 +09:00
scripts release as more-captcha 2023-10-30 21:27:12 +02:00
src/captcha 1.1.0 2024-06-11 19:17:21 +03:00
tests change 22050 hz 16 bit wavs to 8000 hz 8 bit ones 2023-10-30 19:30:23 +02:00
.gitignore fix: use multiline_textbbox for image captcha 2023-07-29 12:19:11 +09:00
LICENSE Meta info of the project 2014-11-25 18:18:54 +08:00
MANIFEST.in chore: add github action, update readme 2023-07-28 23:51:55 +09:00
pyproject.toml 1.0.0 : fix classifiers 2024-04-19 21:00:11 +03:00
README.md 1.0.0 : stable release & author fix 2024-04-19 20:58:50 +03:00
README.rst release as more-captcha 2023-10-30 21:27:12 +02:00
requirements.txt chore: add github action, update readme 2023-07-28 23:51:55 +09:00
setup.py refactor!: restructure the code, add type hints 2023-07-28 23:38:16 +09:00

Captcha

a fork of https://github.com/lepture/captcha with support of a lot more data

A captcha library that generates audio and image CAPTCHAs.

GitHub Sponsor Build Status PyPI codecov

Install

Install captcha with pip:

pip install more-captcha

Features

  1. Audio CAPTCHAs
  2. Image CAPTCHAs

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.

  1. GitHub: https://github.com/lepture/captcha
  2. Docs: https://captcha.lepture.com/

Demo

Here are some demo results:

  1. Image:

Image

  1. Audio: wav file