Skip to content

Python library to verify user's response to Google reCAPTCHA

Notifications You must be signed in to change notification settings

steven-chau/google_recaptcha_lite

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

google_recaptcha_lite

This is a Python library to help you verify a user's response to Google's reCAPTCHA.

Demonstration

http://goog-recaptcha-lite.appspot.com/

Credits

This Python module was derived from this project: https://github.com/sirjhep/gRecaptcha4py

Usage

  1. Copy the file google_recaptcha_lite.py to your project.
  2. In your Python script that handles the verification of reCAPTCHA, do this:
  3. Import this module: from google_recaptcha_lite import GoogleRecaptchaLite
  4. Include something like this:
  userResp = request.form.get('g-recaptcha-response')
  captchalite = GoogleRecaptchaLite(GOOGLE_RECAPTCHA_SECRET)
  apiJson = captchalite.verify(userResp)

  if apiJson['success']:
      return 'You have passed Google Recaptcha!'
  else:
      return 'You have failed Google Recaptcha!'

See example_on_gae for a full example of using this module on Google App Engine.

About

Python library to verify user's response to Google reCAPTCHA

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published