{"id":15297419,"url":"https://github.com/andersonfirmino/flask-google-recaptcha","last_synced_at":"2025-04-13T23:16:12.343Z","repository":{"id":57430357,"uuid":"128445269","full_name":"AndersonFirmino/flask-google-recaptcha","owner":"AndersonFirmino","description":"Fully Working Flask ReCaptcha ;) :snake:","archived":false,"fork":false,"pushed_at":"2018-04-25T12:24:13.000Z","size":45,"stargazers_count":5,"open_issues_count":2,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-13T23:16:02.196Z","etag":null,"topics":["captcha","flask","google-appengine","python2","python3","recaptcha","wtf"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AndersonFirmino.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-04-06T18:56:04.000Z","updated_at":"2023-01-23T20:46:21.000Z","dependencies_parsed_at":"2022-08-26T04:43:35.786Z","dependency_job_id":null,"html_url":"https://github.com/AndersonFirmino/flask-google-recaptcha","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndersonFirmino%2Fflask-google-recaptcha","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndersonFirmino%2Fflask-google-recaptcha/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndersonFirmino%2Fflask-google-recaptcha/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndersonFirmino%2Fflask-google-recaptcha/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AndersonFirmino","download_url":"https://codeload.github.com/AndersonFirmino/flask-google-recaptcha/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248794569,"owners_count":21162615,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["captcha","flask","google-appengine","python2","python3","recaptcha","wtf"],"created_at":"2024-09-30T19:17:25.022Z","updated_at":"2025-04-13T23:16:12.309Z","avatar_url":"https://github.com/AndersonFirmino.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Flask Google ReCaptcha\n\n[![PyPI pyversions](https://img.shields.io/pypi/pyversions/ansicolortags.svg)](https://pypi.python.org/pypi/ansicolortags/)\n\nThe Working Google ReCaptcha implementation for Flask without Flask-WTF.\n\nCan also be used as standalone\n\n---\n\n## Install\n    pip install Flask-GoogleReCaptcha\n\n    # or\n\n    pip install git+https://github.com/AndersonFirmino/flask-google-recaptcha.git\n\n    If you are using pipenv\n    pipenv install Flask-GoogleReCaptcha\n\n\nThis implementation is pure and has no dependencies from third parties. Works in both Python2 and Python3.\nYou can use it in any flask project.\n\nHas Google App Engine (GAE) support!\n\n\n# Usage\n\n### Implementation view.py\n\n    from flask import Flask\n    from flask_google_recaptcha import GoogleReCaptcha\n\n    app = Flask(__name__)\n    recaptcha = GoogleReCaptcha(app=app)\n\n    # or\n\n    recaptcha = GoogleReCaptcha()\n    recaptcha.init_app(app)\n\n\n### In your template: **{{ recaptcha }}**\n\nInside of the form you want to protect, include the tag: **{{ recaptcha }}**\n\nIt will insert the code automatically\n\n\n    \u003cform method=\"post\" action=\"/submit\"\u003e\n        ... your field\n        ... your field\n\n        {{ recaptcha }}\n\n        [submit button]\n    \u003c/form\u003e\n\n\n\n\n### Verify the captcha\n\nIn the view that's going to validate the captcha\n\n    from flask import Flask\n    from flask_google_recaptcha import GoogleReCaptcha\n\n    app = Flask(__name__)\n    recaptcha = GoogleReCaptcha(app=app)\n\n    @route(\"/submit\", methods=[\"POST\"])\n    def submit():\n\n        if recaptcha.verify():\n            # SUCCESS\n            pass\n        else:\n            # FAILED\n            pass\n\n\nRemember to set SITE_KEY and SECRET_KEY if not it does not appear!\n\n## Api\n\n**reCaptcha.__init__(app, site_key, secret_key, is_enabled=True)**\n\n**reCaptcha.get_code()**\n\nReturns the HTML code to implement. But you can use\n**{{ recaptcha }}** directly in your template\n\n**reCaptcha.verfiy()**\n\nReturns bool\n\n## In Template\n\nJust include **{{ recaptcha }}** wherever you want to show the recaptcha\n\n\n## Config\n\nFlask-ReCaptcha is configured through the standard Flask config API.\nThese are the available options:\n\n**RECAPTCHA_ENABLED**: Bool - True by default, when False it will bypass validation\n\n**RECAPTCHA_SITE_KEY** : Public key\n\n**RECAPTCHA_SECRET_KEY**: Private key\n\nThe following are **Optional** arguments.\n\n**RECAPTCHA_THEME**: String - Theme can be 'light'(default) or 'dark'\n\n**RECAPTCHA_TYPE**: String - Type of recaptcha can be 'image'(default) or 'audio'\n\n**RECAPTCHA_SIZE**: String - Size of the image can be 'normal'(default) or 'compact'\n\n**RECAPTCHA_TABINDEX**: Int - Tabindex of the widget can be used, if the page uses tabidex, to make navigation easier. Defaults to 0\n\n    RECAPTCHA_ENABLED = True\n    RECAPTCHA_SITE_KEY = \"\"\n    RECAPTCHA_SECRET_KEY = \"\"\n    RECAPTCHA_THEME = \"dark\"\n    RECAPTCHA_TYPE = \"image\"\n    RECAPTCHA_SIZE = \"compact\"\n    RECAPTCHA_RTABINDEX = 10\n\n---\n\nAnderson Araujo (coderpy) :snake:\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandersonfirmino%2Fflask-google-recaptcha","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandersonfirmino%2Fflask-google-recaptcha","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandersonfirmino%2Fflask-google-recaptcha/lists"}