Skip to content

randcaptcha v0.2

Latest

Choose a tag to compare

@LeonardoReichert LeonardoReichert released this 19 Jan 17:24
· 5 commits to main since this release

randcaptcha

Genera una imagen de una captcha random | generate a random captcha image with Python2 or Python3

Dependencies:

pip install Pillow

Example:

CreateImageCaptcha(..) return text content on captcha and filename of captcha.

>>> CreateImageCaptcha(["impact", "arial"], 25, background=(180, 180, 180));
('QBLGG', 'C:\Users\..\AppData\Local\Temp\captcha31t3_kho.jpg')
...
>>> CreateImageCaptcha(["impact", "arial"], 25, length=6, background=(180, 180, 180));
('4LU9EH', 'C:\Users\..\AppData\Local\Temp\captchaot67ifqf.jpg')
...
>>> CreateImageCaptcha("impact", 25, filename_out="micaptcha.jpg", background=(20, 20, 20));
('QYGYU', 'micaptcha.jpg')

1

image

2

image

3

image

Last Changes:


version 0.2

Added params **kw, can use new param "rotate" for specify random angle of rotation. Module compatibility with Py2 and Py3