Skip to content

Latest commit

 

History

History
40 lines (30 loc) · 1.17 KB

File metadata and controls

40 lines (30 loc) · 1.17 KB

Arcaptcha GitHub PyPI

Validate and display captcha from Arcaptcha easily in Python. (PyPI)

Installation

The package can be installed easily by pip install arcaptcha command.

Usage

# Import the package to the project
from arcaptcha import Arcaptcha

# Create a new instance of Captcha object
captcha = Arcaptcha.Captcha(site_key = "my_site_key", secret_key = "my_secret_key")

# Verify challenge
>>> captcha.verify(challenge_id = "example_challenge_id")
True

# Display API script tag
>>> captcha.display_tag()
"<script src='https://widget.arcaptcha.ir/1/api.js' async defer></script>"

# Display captcha HTML tag
>>> captcha.display()
"<div class='arcaptcha' data-site-key='my_site_key'></div>"