Metadata-Version: 2.1
Name: hcaptcha
Version: 0.2.1
Summary: A Python package for integrating hCaptcha, a popular captcha service, into various applications for enhanced security and user verification.
Home-page: https://github.com/VaibhavSys/hcaptcha
License: MIT
Keywords: captcha,hcaptcha,async,aiohttp,aiodns,asyncio,async,user verification,security,enhanced security,captcha service,captcha integration
Author: Vaibhav Dhiman
Author-email: vaibhavsys@protonmail.com
Requires-Python: >=3.5,<4.0
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Requires-Dist: aiodns (>=3.0.0,<4.0.0)
Requires-Dist: aiohttp (>=3.8.4,<4.0.0)
Project-URL: Repository, https://github.com/VaibhavSys/hcaptcha
Description-Content-Type: text/markdown

# 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:

```bash
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](https://hCaptcha.com/?r=cc7220f46013).

```python
from hcaptcha.hcaptcha import HCaptchaVerifier, HCaptchaVerificationError
import asyncio

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

# Verify an hcaptcha response
# You can use await instead of asyncio.run if you are in a async function
try:
    is_valid = asyncio.run(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](https://github.com/VaibhavSys/hcaptcha/blob/master/docs/sources/api/hcaptcha.md)

## Contributing
If you find a bug or have a feature request, please open an issue on [GitHub](https://github.com/VaibhavSys/hcaptcha).

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

