Modern hCaptcha SDK for PyQt applications
Project description
PyQtHCaptcha
PyQtHCaptcha is a Python library that provides a native hCaptcha widget for desktop applications using PyQt6.
Features
- Supports all configuration parameters of the native mobile SDK, including enterprise features like
rqdataand custom endpoints - Supports passive mode captchas with invisibles challenges
- Fully typed with modern Python type hints
- Works with
qasyncfor seamless integration into async applications
Installation
pip install pyqt-hcaptcha
Usage
Injecting a hCaptcha widget into your PyQt application is straightforward. Below is a minimal example demonstrating how to set up the widget and connect to its signals:
from PyQtHCaptcha import HCaptchaConfig, HCaptchaError, HCaptchaWebView
# Define your callbacks
def on_loaded():
print("hCaptcha widget loaded successfully")
def on_success(token: str):
print(f"Solution received: {token[:40]}...")
def on_failure(error: HCaptchaError):
print(f"hCaptcha Error: {error.name}")
def on_expired():
print("hCaptcha token expired")
# Create a configuration for the hCaptcha widget
config = HCaptchaConfig(
sitekey="10000000-ffff-ffff-ffff-000000000001",
url="https://accounts.hcaptcha.com/demo",
theme="dark",
)
# Initialize the hCaptcha widget with the configuration
view = HCaptchaWebView(config)
# Connect signals to your callbacks
view.onLoaded.connect(on_loaded)
view.onSuccess.connect(on_success)
view.onFailure.connect(on_failure)
view.onExpired.connect(on_expired)
# Show the widget
view.setWindowTitle("hCaptcha Example")
view.resize(400, 600)
view.show()
See the examples/ directory for more complete examples.
Documentation
The documentation is available here.
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
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 pyqt_hcaptcha-1.1.0.tar.gz.
File metadata
- Download URL: pyqt_hcaptcha-1.1.0.tar.gz
- Upload date:
- Size: 10.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b73888e0d3ba74e190c8732e34050584beeb27ae9b58cbdcfa0729f783eaa41e
|
|
| MD5 |
0dc0d95d0becb9b45c21d6a2fbc65e2d
|
|
| BLAKE2b-256 |
e7b264dd389f3209800b38f47a4681e5672b0aa2fad8dcf43614a3638a631088
|
Provenance
The following attestation bundles were made for pyqt_hcaptcha-1.1.0.tar.gz:
Publisher:
publish.yml on dolfies/pyqt-hcaptcha
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyqt_hcaptcha-1.1.0.tar.gz -
Subject digest:
b73888e0d3ba74e190c8732e34050584beeb27ae9b58cbdcfa0729f783eaa41e - Sigstore transparency entry: 976233158
- Sigstore integration time:
-
Permalink:
dolfies/pyqt-hcaptcha@64a2fbefb9933751cf04dd1f71cd956fd3f37adb -
Branch / Tag:
refs/tags/v1.1.0 - Owner: https://github.com/dolfies
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@64a2fbefb9933751cf04dd1f71cd956fd3f37adb -
Trigger Event:
release
-
Statement type:
File details
Details for the file pyqt_hcaptcha-1.1.0-py3-none-any.whl.
File metadata
- Download URL: pyqt_hcaptcha-1.1.0-py3-none-any.whl
- Upload date:
- Size: 10.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cd39ee45bc308703464ba73e8d316492b4870f1a5e288eb2e840e356e67dc37a
|
|
| MD5 |
0af3eb79e52ec33ee47843af0b696da5
|
|
| BLAKE2b-256 |
37d86ef15029f335fc238ccb7822d6c75cabb60cf9ed6738bcc7675c16d05e95
|
Provenance
The following attestation bundles were made for pyqt_hcaptcha-1.1.0-py3-none-any.whl:
Publisher:
publish.yml on dolfies/pyqt-hcaptcha
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyqt_hcaptcha-1.1.0-py3-none-any.whl -
Subject digest:
cd39ee45bc308703464ba73e8d316492b4870f1a5e288eb2e840e356e67dc37a - Sigstore transparency entry: 976233160
- Sigstore integration time:
-
Permalink:
dolfies/pyqt-hcaptcha@64a2fbefb9933751cf04dd1f71cd956fd3f37adb -
Branch / Tag:
refs/tags/v1.1.0 - Owner: https://github.com/dolfies
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@64a2fbefb9933751cf04dd1f71cd956fd3f37adb -
Trigger Event:
release
-
Statement type: