Dynamically generated, AI-resistant captcha images
Project description
clockcaptcha
Dynamically generated, AI-resistant captcha images.
Can you tell what time it is? AI can't.
Features:
- dynamically generated images
- rgb and grayscale color mode
- 12-hour and 24-hour clock mode
- custom colors
Installation
pip install clockcaptcha
Usage
from clockcaptcha import ClockCaptcha
captcha = ClockCaptcha()
print(captcha.value)
captcha.verify('0645') # True/False
captcha.save_image('image.png')
# generate new captcha
captcha.generate_new()
Choose between color_mode='rgb' (color-captcha.png)
or 'grayscale' (grayscale-captcha.png).
Pick between a 12-hour or a 24-hour clock_mode.
from clockcaptcha import ClockCaptcha
captcha = ClockCaptcha(clock_mode=12)
Image size can be changed with relative size parameter. Here are corresponding pixel values.
| size | width | height |
|---|---|---|
| 1 | 190 | 65 |
| 2 | 380 | 130 |
| 3 | 570 | 195 |
| 4 | 760 | 260 |
| ... | ... | ... |
Change colors globally:
from clockcaptcha import ClockCaptcha
ClockCaptcha.set_colors([
'#FFFFFF',
'#000000',
'#999999'
])
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
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 clockcaptcha-0.1.3.tar.gz.
File metadata
- Download URL: clockcaptcha-0.1.3.tar.gz
- Upload date:
- Size: 23.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f6eec9394086268c0d900fd804aea4d48e2443b749a30bf79b41cfed15d43b2b
|
|
| MD5 |
770d923fa98ea4ce69e851264bb0330f
|
|
| BLAKE2b-256 |
c20558bc580262d416b06f40cbf0cbaf5997dca48a50bd3f347d2e5d7ab59f1c
|
File details
Details for the file clockcaptcha-0.1.3-py3-none-any.whl.
File metadata
- Download URL: clockcaptcha-0.1.3-py3-none-any.whl
- Upload date:
- Size: 6.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8a15f70b1941ef5aaf3cac2878e0947f3d35b26ddb6ecd25f7cbf8b635b893d5
|
|
| MD5 |
50d0add914b5860cafef5a8856ec3ae2
|
|
| BLAKE2b-256 |
ec97763b26c15329b17a4b28d7e0979a2b9e4d99b829b5b2f8e94340eb3b951f
|