Skip to main content

clockcaptcha

Dynamically generated, AI-resistant captcha images.

captcha

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'
])

Metadata

Release files for clockcaptcha 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for clockcaptcha 0.1.3
File Size Uploaded
clockcaptcha-0.1.3.tar.gz 23.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for clockcaptcha 0.1.3
File Interpreter ABI Platform
clockcaptcha-0.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 30.0 kB

Release files / clockcaptcha-0.1.3.tar.gz

Download URL clockcaptcha-0.1.3.tar.gz
Size 23.8 kB
Tags Source
SHA-256 checksum
How to use checksums
f6eec9394086268c0d900fd804aea4d48e2443b749a30bf79b41cfed15d43b2b
BLAKE2b-256 checksum
How to use checksums
c20558bc580262d416b06f40cbf0cbaf5997dca48a50bd3f347d2e5d7ab59f1c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.9.20

Release files / clockcaptcha-0.1.3-py3-none-any.whl

Download URL clockcaptcha-0.1.3-py3-none-any.whl
Size 6.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8a15f70b1941ef5aaf3cac2878e0947f3d35b26ddb6ecd25f7cbf8b635b893d5
BLAKE2b-256 checksum
How to use checksums
ec97763b26c15329b17a4b28d7e0979a2b9e4d99b829b5b2f8e94340eb3b951f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.9.20

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 release files

0.1.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page