keptcha is an API wrapper for https://captcha-api.akshit.me written in Python.
Project description
Keptcha py
keptcha is an API wrapper (python) for captcha-api. Provides both Synchronous and Asynchronous interfaces to interact with the API.
Installation
pip install keptcha
OR using git
pip install git+https://github.com/captcha-api/keptcha-py
Usage
keptcha supports both Sync and Async usage.
Sync
from keptcha import Captcha
my_captcha = Captcha.new()
my_captcha.decode()
if my_captcha.verify("1337H4kOr"):
print("You are not a bot!")
Async
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!")
Configuration
You can pass some keyword arguments to personalize your captcha.
my_captcha = Captcha.new(height=100, width=250, circles=100, length=5)
How to handle bad input?
You can do exception handling.
from keptcha.errors import IncorrectCaptcha
try:
my_captcha.verify("bad input")
except IncorrectCaptcha:
print("sir you suck")
Contributing
Feel free to submit a pull request. We very much appreciate it!
License
Licenced under MIT.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file keptcha-0.1.2.tar.gz.
File metadata
- Download URL: keptcha-0.1.2.tar.gz
- Upload date:
- Size: 5.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.6.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.9.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
871ce498577f154a7d96dc11363a9b3ae90c5687c93b1150f7a1342a9b00ff9a
|
|
| MD5 |
bf1ce77a5fa0bbe48a4ac52b3c4deeb3
|
|
| BLAKE2b-256 |
0cfb1436fc2b1acd3c2315d248ad66e57bc54c15f7bddd0d809dd47f72f81c26
|
File details
Details for the file keptcha-0.1.2-py3-none-any.whl.
File metadata
- Download URL: keptcha-0.1.2-py3-none-any.whl
- Upload date:
- Size: 7.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.6.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.9.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d285b28fa133765c84087afe0e82ee8689ec657e8ba496b67d491b370da40ac4
|
|
| MD5 |
58a953da7b06626c065463369ca8f9d2
|
|
| BLAKE2b-256 |
c380dfa67105c43fe02fc46db9af77f338039df72dc88a94d415d0575c3d286b
|