A library that generates image CAPTCHAs.
Project description
util-captcha
-
Captcha with default
-
Captcha with Noise dots
-
Captcha with space evenly
-
Base64 data
Introduction
A library that generates image CAPTCHAs.
Installation
pip install util-captcha
Usage
from util_captcha import ImageCaptcha
image_captcha = ImageCaptcha()
# generate default captcha
image_captcha.draw_chars()
image_captcha.draw_noise_curve()
image_captcha.draw_noise_dots()
image_captcha.canvas.save("./examples/captcha-default.png")
# generate captcha of only noise dots
image_captcha.redraw() # redraw canvas (required)
image_captcha.draw_chars()
image_captcha.draw_noise_dots(333)
image_captcha.canvas.save("./examples/captcha-noise_dots.png")
# generate captcha by space evenly
image_captcha.redraw() # redraw canvas (required)
image_captcha.draw_chars("abc", space_evenly=True)
image_captcha.canvas.save("./examples/captcha-space_evenly-True.png")
image_captcha.redraw() # redraw canvas (required)
image_captcha.draw_chars("abc", space_evenly=False)
image_captcha.canvas.save("./examples/captcha-space_evenly-False.png")
# use base64 data to generate captcha
image_captcha.redraw() # redraw canvas (required)
image_captcha.draw_chars("base64")
data = image_captcha.generate_base64()
print(data)
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
util_captcha-0.2.0.tar.gz
(11.6 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file util_captcha-0.2.0.tar.gz.
File metadata
- Download URL: util_captcha-0.2.0.tar.gz
- Upload date:
- Size: 11.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.2.2 CPython/3.9.9 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5cabe8f20377c55fa2b36bf0ad73fefb1c1641a0228af6eecef832d9e7a49f7d
|
|
| MD5 |
43c34e726465740014d67181a4da23d4
|
|
| BLAKE2b-256 |
305e218d3b694b369868b62ac096264f2c9c87b544c22e2c307f7c101c482bd3
|
File details
Details for the file util_captcha-0.2.0-py3-none-any.whl.
File metadata
- Download URL: util_captcha-0.2.0-py3-none-any.whl
- Upload date:
- Size: 11.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.2.2 CPython/3.9.9 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d158c20fdb546716400c3f43425366ac18786094819f9067fa631df10bdc5ff6
|
|
| MD5 |
aa530dfc8ea7fc59ae9cff90bac5c873
|
|
| BLAKE2b-256 |
b27e37231cda5bc6fe6636618a6641c84b8a4ffa0287744a3a174a01f8f5ac86
|