keptcha
is an API wrapper (python) for captcha-api. Provides both Synchronous and Asynchronous interfaces to interact with the API.
pip install keptcha
OR using git
pip install git+https://github.com/captcha-api/keptcha-py
keptcha
supports both Sync and Async usage.
from keptcha import Captcha
my_captcha = Captcha.new()
my_captcha.decode()
if my_captcha.verify("1337H4kOr"):
print("You are not a bot!")
from keptcha import AsyncCaptcha
my_captcha = await AsyncCaptcha.new()
await my_captcha.decode()
if (await my_captcha.verify("1337H4kOr")):
print("You are not a bot!")
You can pass some keyword arguments to personalize your captcha.
my_captcha = Captcha.new(height=100, width=250, circles=100, length=5)
You can do exception handling.
from keptcha.errors import IncorrectCaptcha
try:
my_captcha.verify("bad input")
except IncorrectCaptcha:
print("sir you suck")
Feel free to submit a pull request. We very much appreciate it!
Licenced under MIT.