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.1.0.tar.gz (3.1 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: hcaptcha-0.1.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.1.0.tar.gz
Algorithm Hash digest
SHA256 6989a08d0e6bc7966b3d8a15c1a6df98dbb2e4cbcdb319b364fa8eb79643fe32
MD5 6f8e89f36e6dfbc791f9186feb8d79af
BLAKE2b-256 4b6cdc73af589d4203df695740c59ac4b396fcdbb48ba81f524ad516083c863d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: hcaptcha-0.1.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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3f45a006a2f3cf375a8f2a0988e276ef2076568c9d6213a7e44eaa0904af76dc
MD5 2895bbaf8dafa749a3e80b56873fbf94
BLAKE2b-256 539b82dc129e30d91e175c3db91b1cbb9c47e28de85f0d994d1b7de3342c2928

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