Skip to main content

Recaptcha v2 and v3

Project description

Logo

Build Status Software License Code style: black Downloads Monthly Downloads

Async Recaptcha V2 & V3

Setup ⚙️

$ pip install aio-recaptcha

Usage

import aiorecaptcha

@app.route('/')
def render_recaptcha():
    render(aiorecaptcha.html(site_key='your_site_key') + aiorecaptcha.js())

@app.route('/verify', methods=['POST'])
async def verify_recaptcha(response_received_from_form):
    try:
        await aiorecaptcha.verify(secret=client_secret, response=response_recieved_from_form)

    except recaptcha.RecaptchaError:
        return 'No! Only hoomans!'

    else:
        return 'Hello hooman!'

API:

js()
html()
coro verify()
exc RecaptchaError

Test

Run:

$ aio-recaptcha/test.sh

Contact 📧

I currently work as a freelance software devloper. Like my work and got a gig for me?

Want to hire me fulltime? Send me an email @ omarryhan@gmail.com

Buy me a coffee ☕

Bitcoin: 3NmywNKr1Lzo8gyNXFUnzvboziACpEa31z

Ethereum: 0x1E1400C31Cd813685FE0f6D29E0F91c1Da4675aE

Bitcoin Cash: qqzn7rsav6hr3zqcp4829s48hvsvjat4zq7j42wkxd

Litecoin: MB5M3cE3jE4E8NwGCWoFjLvGqjDqPyyEJp

Paypal: https://paypal.me/omarryhan

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

aio-recaptcha-0.0.9.tar.gz (4.7 kB view details)

Uploaded Source

File details

Details for the file aio-recaptcha-0.0.9.tar.gz.

File metadata

  • Download URL: aio-recaptcha-0.0.9.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3

File hashes

Hashes for aio-recaptcha-0.0.9.tar.gz
Algorithm Hash digest
SHA256 88faa04842116d9904a8d5a893dc0a1d43f1da4733f5430c038a28ab03862c60
MD5 3c966dea490f74c3e0437baeeca6a75b
BLAKE2b-256 8ef62387bfde11bcd9ade548a16366bea4049d740a89fcfd634aaa6cc04d465c

See more details on using hashes here.

Supported by

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