Skip to main content

A Python package for integrating hCaptcha, a popular captcha service, into various applications for enhanced security and user verification.

Project description

hcaptcha

hcaptcha is a Python module (unofficial) that provides an easy-to-use interface for verifying hcaptcha responses using the hcaptcha verification API.

Installation

You can install hcaptcha using pip:

pip install hcaptcha

Usage

To use hcaptcha, you'll need an hcaptcha secret key for your site. You can get one by signing up for an account at hcaptcha website.

from hcaptcha.hcaptcha import HCaptchaVerifier, HCaptchaVerificationError

# Initialize the verifier with your hcaptcha secret key
verifier = HCaptchaVerifier(your_hcaptcha_secret_key)

# Verify an hcaptcha response
try:
    is_valid = await verifier.verify(user_response_token)
    if is_valid:
        print("Captcha verified successfully.")
    else:
        print("Captcha verification failed.")
except HCaptchaVerificationError as e:
    print(f"Verification failed with error: {str(e)}")

Documentation

Documentation for hcaptcha is available here

Contributing

If you find a bug or have a feature request, please open an issue on GitHub.

Licence

hcaptcha is distributed under the MIT License. See LICENSE for more information.

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

hcaptcha-0.2.0.tar.gz (3.1 kB view details)

Uploaded Source

Built Distribution

hcaptcha-0.2.0-py3-none-any.whl (3.0 kB view details)

Uploaded Python 3

File details

Details for the file hcaptcha-0.2.0.tar.gz.

File metadata

  • Download URL: hcaptcha-0.2.0.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.13 CPython/3.10.10 Linux/6.2.7-zen1-1-zen

File hashes

Hashes for hcaptcha-0.2.0.tar.gz
Algorithm Hash digest
SHA256 69d083a9a79f8df3ecf6258b522b6de78a0889a518c05eaa67454fbcb1f231ef
MD5 9e53fc6ad3a3fb365994f5f6039624ab
BLAKE2b-256 8319840e35e0efa4e7aee6ff1f77fdb5562bfb6f10f810cd6c3340a7e4b81793

See more details on using hashes here.

File details

Details for the file hcaptcha-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: hcaptcha-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 3.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.13 CPython/3.10.10 Linux/6.2.7-zen1-1-zen

File hashes

Hashes for hcaptcha-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 dce562c0739ce06978536db4303bad57d27ef0469bc75c5fc3fa1aef51de8e8a
MD5 0de41c4e5df927d993bb6963a7b3c559
BLAKE2b-256 548bdb9b52e7270443996f1116b61503610b4c71bd628bf643c7e2f2032afa54

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page