Skip to main content

PyQtHCaptcha

PyQtHCaptcha is a Python library that provides a native hCaptcha widget for desktop applications using PyQt6.

PyQtHCaptcha Demo

Features

  • Supports all configuration parameters of the native mobile SDK, including enterprise features like rqdata and custom endpoints
  • Supports passive mode captchas with invisibles challenges
  • Fully typed with modern Python type hints
  • Works with qasync for 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.

Metadata

Release files for pyqt-hcaptcha 1.2.0

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

Source distribution (sdist)

Source distribution for pyqt-hcaptcha 1.2.0
File Size Uploaded
pyqt_hcaptcha-1.2.0.tar.gz 10.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pyqt-hcaptcha 1.2.0
File Interpreter ABI Platform
pyqt_hcaptcha-1.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 21.0 kB

Release files / pyqt_hcaptcha-1.2.0.tar.gz

Download URL pyqt_hcaptcha-1.2.0.tar.gz
Size 10.9 kB
Tags Source
SHA-256 checksum
How to use checksums
8cb7d37a1edeab302256693aff19dcafffbbfcb27c89b01bc11cbb8c9c0e6a8e
BLAKE2b-256 checksum
How to use checksums
df86de6f0e315c235c1e863883dc889bfd112380f1fdf2cba73da823825f6302
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 22, 2026.

Transparency log

Release files / pyqt_hcaptcha-1.2.0-py3-none-any.whl

Download URL pyqt_hcaptcha-1.2.0-py3-none-any.whl
Size 10.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5573ba47417f44d95cff622702bd3ce95535bc48e57655bebf4c235a84b405d4
BLAKE2b-256 checksum
How to use checksums
a1598387a2e82ce29385d74f727a2457dedcf6f3214a7281ce0f61e4849cd4f7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 22, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.2.0 This release

2 release files

1.1.0

2 release files

1.0.1

2 release files

1.0.0

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