Skip to main content

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 hashes)

Uploaded Source

Built Distribution

common_captcha-1.0.0-py2.py3-none-any.whl (8.4 MB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page