common captcha for web server
Project description
验证码程序,包括简单验证码和滑块验证码
Introduction
Install with pip:
$ python -m pip install common-captcha
How To Use?
在此之前,你需要准备一个可用的redis
redis_url redis://xxxxxx:xxxxxx@xxxxx:xxx/11
简单验证码:
from common_captcha.strategy.simple_captcha import SimpleCaptcha
simple_captcah = SimpleCaptcha(redis_url="redis://xxxxxx:xxxxxx@xxxxx:xxx/11")
print(simple_captcah.get())
print(simple_captcah.verify({"token": "", "code": ""}))
滑块验证码:
from common_captcha.strategy.block_puzzle_captcha import BlockPuzzleCaptcha
block_captcha = BlockPuzzleCaptcha(redis_url="redis://xxxxxx:xxxxxx@xxxxx:xxx/11")
print(block_captcha.get())
print(block_captcha.verify(token="", point_json={"x": "", "y": ""}))
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
common_captcha-1.0.0.tar.gz
(8.4 MB
view details)
Built Distribution
File details
Details for the file common_captcha-1.0.0.tar.gz
.
File metadata
- Download URL: common_captcha-1.0.0.tar.gz
- Upload date:
- Size: 8.4 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fca78103f49eba7d5a36420110dd38aeb5e745c80cb5ad9be5b135226bdf92ee |
|
MD5 | 09887287358dced76c8529fe30bf4a47 |
|
BLAKE2b-256 | 8a360d841b594bc561fb93f24c337a8d3a5d866236414fc13c522df462b8f34e |
File details
Details for the file common_captcha-1.0.0-py2.py3-none-any.whl
.
File metadata
- Download URL: common_captcha-1.0.0-py2.py3-none-any.whl
- Upload date:
- Size: 8.4 MB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a40ea363759419bfda29d2b88de58c244f3b0c371313d413dd01de360ffe97df |
|
MD5 | dcabbc851d2f79ed1a878ce5f1564b91 |
|
BLAKE2b-256 | 3912895e8c5a0bc4a96d9e83d5c6a19c059672e77d3e7aca5f8c4ff8b175d676 |