hcaptcha


Namehcaptcha JSON
Version 0.2.1 PyPI version JSON
download
home_pagehttps://github.com/VaibhavSys/hcaptcha
SummaryA Python package for integrating hCaptcha, a popular captcha service, into various applications for enhanced security and user verification.
upload_time2023-04-07 14:34:50
maintainer
docs_urlNone
authorVaibhav Dhiman
requires_python>=3.5,<4.0
licenseMIT
keywords captcha hcaptcha async aiohttp aiodns asyncio async user verification security enhanced security captcha service captcha integration
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/VaibhavSys/hcaptcha",
    "name": "hcaptcha",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.5,<4.0",
    "maintainer_email": "",
    "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",
    "download_url": "https://files.pythonhosted.org/packages/1f/e5/03999e98a0c46652213af3af28560665a48dad069e995a8de7c19f782a60/hcaptcha-0.2.1.tar.gz",
    "platform": null,
    "description": "# hcaptcha\nhcaptcha is a Python module (unofficial) that provides an easy-to-use interface for verifying hcaptcha responses using the hcaptcha verification API.\n\n## Installation\nYou can install hcaptcha using pip:\n\n```bash\npip install hcaptcha\n```\n\n## Usage\nTo 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).\n\n```python\nfrom hcaptcha.hcaptcha import HCaptchaVerifier, HCaptchaVerificationError\nimport asyncio\n\n# Initialize the verifier with your hcaptcha secret key\nverifier = HCaptchaVerifier(your_hcaptcha_secret_key)\n\n# Verify an hcaptcha response\n# You can use await instead of asyncio.run if you are in a async function\ntry:\n    is_valid = asyncio.run(verifier.verify(user_response_token))\n    if is_valid:\n        print(\"Captcha verified successfully.\")\n    else:\n        print(\"Captcha verification failed.\")\nexcept HCaptchaVerificationError as e:\n    print(f\"Verification failed with error: {str(e)}\")\n```\n## Documentation\nDocumentation for hcaptcha is available [here](https://github.com/VaibhavSys/hcaptcha/blob/master/docs/sources/api/hcaptcha.md)\n\n## Contributing\nIf you find a bug or have a feature request, please open an issue on [GitHub](https://github.com/VaibhavSys/hcaptcha).\n\n## Licence\nhcaptcha is distributed under the MIT License. See LICENSE for more information.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A Python package for integrating hCaptcha, a popular captcha service, into various applications for enhanced security and user verification.",
    "version": "0.2.1",
    "split_keywords": [
        "captcha",
        "hcaptcha",
        "async",
        "aiohttp",
        "aiodns",
        "asyncio",
        "async",
        "user verification",
        "security",
        "enhanced security",
        "captcha service",
        "captcha integration"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "87a1d0b819d685da33c4fb80a674094e99298d4d4baca979d54501b21ea3648c",
                "md5": "2eda5dc4c39ce197e071ed0857454d49",
                "sha256": "08f3be3eb08a6c59289af7de32d359d869a325215f615e2495a314d39921274d"
            },
            "downloads": -1,
            "filename": "hcaptcha-0.2.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "2eda5dc4c39ce197e071ed0857454d49",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.5,<4.0",
            "size": 3022,
            "upload_time": "2023-04-07T14:34:48",
            "upload_time_iso_8601": "2023-04-07T14:34:48.592746Z",
            "url": "https://files.pythonhosted.org/packages/87/a1/d0b819d685da33c4fb80a674094e99298d4d4baca979d54501b21ea3648c/hcaptcha-0.2.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1fe503999e98a0c46652213af3af28560665a48dad069e995a8de7c19f782a60",
                "md5": "10eb6c08498ccc915700ab9e8e35e4f4",
                "sha256": "3536d67350d9bd3fce7bce97b80868c6dc67e44c5591af0eaa3910f93bb08f65"
            },
            "downloads": -1,
            "filename": "hcaptcha-0.2.1.tar.gz",
            "has_sig": false,
            "md5_digest": "10eb6c08498ccc915700ab9e8e35e4f4",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.5,<4.0",
            "size": 3172,
            "upload_time": "2023-04-07T14:34:50",
            "upload_time_iso_8601": "2023-04-07T14:34:50.143657Z",
            "url": "https://files.pythonhosted.org/packages/1f/e5/03999e98a0c46652213af3af28560665a48dad069e995a8de7c19f782a60/hcaptcha-0.2.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-04-07 14:34:50",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "VaibhavSys",
    "github_project": "hcaptcha",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "hcaptcha"
}
        
Elapsed time: 1.23610s