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)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| capcha-3.3.tar.gz | 166.1 kB | Without provenance | Details for capcha-3.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| capcha-3.3-py3-none-any.whl | Python 3 | none | any | Details for capcha-3.3-py3-none-any.whl |
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
|
Security for capcha 3.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.