Skip to main content

CAPCHA Library (Python) A Python library designed to implement CAPCHA (Completely Automated Public Turing test to tell Computers and Humans Apart) functionality in web applications. This library is lightweight, flexible, and aims to provide a reliable solution for preventing automated bot attacks on your web forms.

Features Easy Integration: Seamlessly integrate CAPTCHA challenges into your web forms with minimal effort. Customization: Customize the appearance and complexity of CAPTCHAs to suit your application's needs. Security: Generate secure and random challenges to effectively thwart automated bots. Accessibility: Prioritize user accessibility by incorporating accessibility features into the CAPTCHA design. Compatibility: Compatible with various Python web development frameworks. Installation Install the library using pip:

pip install capcha

Usage Example

from capcha import Capcha from flask import Flask, render_template, request

app = Flask(name) captcha = Capcha()

@app.route('/') def index(): # Генерация CAPTCHA при загрузке страницы captcha_image = captcha.generate() return render_template('index.html', captcha_image=captcha_image)

@app.route('/submit', methods=['POST']) def submit(): user_entered_captcha = request.form.get('captcha') expected_captcha = # получите ожидаемое значение из вашего хранилища данных

is_valid_captcha = captcha.validate(user_entered_captcha, expected_captcha)

if is_valid_captcha:
    # Продолжить с отправкой формы
    pass
else:
    # Вывести сообщение об ошибке пользователю
    pass

Metadata

Release files for capcha 3.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 capcha 3.3
File Size Uploaded
capcha-3.3.tar.gz 166.1 kB Details

Built distribution (wheel)

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

Total release size: 329.0 kB

Release files / capcha-3.3.tar.gz

Download URL capcha-3.3.tar.gz
Size 166.1 kB
Tags Source
SHA-256 checksum
How to use checksums
b089c01ecbf0da16fdebb91fcaf36dc06007a09c7eaffc065c7e0c936fb319f4
BLAKE2b-256 checksum
How to use checksums
bc7f1011d3a6965fc4f0b2e630fbdaa638edd2960f4a1862eb67d076a74dbd09
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.9.0

Release files / capcha-3.3-py3-none-any.whl

Download URL capcha-3.3-py3-none-any.whl
Size 162.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
43b2da9530dd8a2c4377a0c163a313eef9abe18e9aee83c602bb6fc8e5cd00e7
BLAKE2b-256 checksum
How to use checksums
d93f135436aa7be2d356f81346b7d6ac6e165d6c2df15586b776d451d5d0d142
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.9.0

Release history Release notifications | RSS feed

This release

3.3 This release

2 release files

3.2

2 release files

2.5

2 release files

2.0

2 release files

1.8

2 release files

1.6

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