프로젝트
GitHub에서 보기
lepture/captcha
소개
음성 및 이미지 CAPTCHA를 생성하는 라이브러리입니다.
디자인 및 미디어측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- 0
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalCaptcha
A captcha library that generates audio and image CAPTCHAs.
Install
Install captcha with pip:
pip install captcha
Features
- Audio CAPTCHAs
- 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.
Use Custom Colors
In order to change colors you have to specify your desired color as a tuple of Red, Green and Blue value.
Example:- (255, 255, 0) for yellow color, (255, 0, 0)` for red color.
from captcha.image import ImageCaptcha
image = ImageCaptcha(fonts=['/path/A.ttf', '/path/B.ttf'])
data = image.generate('1234')
image.write('1234', 'out.png', bg_color=(255, 255, 0), fg_color=(255, 0, 0)) # red text in yellow background
Useful Links
Demo
Here are some demo results:

관련 프로젝트 살펴보기
불러오는 중…