Coder Social home page Coder Social logo

gt3-python-sdk's Introduction

Gt Python SDK

使用 3.1 之前版本SDK的用户如果想更新到3.1以及以后版本请先联系极验客服,因为为了兼容老用户,新的特性需要修改验证设置。

极验验证的Python SDK目前提供基于django, flask, tornado框架的DEMO。

本项目是面向服务器端的,具体使用可以参考我们的 文档 ,客户端相关开发请参考我们的 前端文档。.

注意事项:部署在生产环境中时,需要将gt.js文件存放到项目中并在页面中引用该文件。该js的作用是充分利用多CDN,使静态文件尽可能加载成功。

开发环境

  • Python (推荐2.7.0以上版本)
  • django, flask, tornado框架

快速开始

下面使用示例代码的均以flask框架为例。

  1. 获取代码

Github 上Clone代码:

$ git clone https://github.com/GeeTeam/gt-python-sdk.git
  1. 安装GeetestSDK
$ sudo python setup.py install
  1. 初始化验证

在调用GeetestLib前请自行设定公钥和私钥,用户id为可选项,默认为随机数字:

根据自己的私钥初始化验证

  1. 二次验证

运行demo

  1. django demo运行:进入django_demo文件夹,运行:
$ python manage.py runserver 0.0.0.0:8000

在浏览器中访问http://localhost:8000即可看到Demo界面

  1. flask demo运行:进入flask_demo文件夹,运行:
$ python start.py

在浏览器中访问http://localhost:5000即可看到Demo界面

  1. tornado demo运行:进入tornado_demo文件夹,运行:
$ python start.py

在浏览器中访问http://localhost:8088即可看到Demo界面

发布日志

  • 3.2.0
  • 添加用户标识(user_id)的接口
  • 3.1.2
  • 支持Python3
  • 3.1.1
  • 统一接口
  • 3.1.0
  • 添加challenge加密特性,使验证更安全, 老版本更新请先联系管理员
  • 3.0.1
  • 修复failback情况下 无法正确解码答案的错误
  • 3.0.0
  • 去除SDK对Session操作, 现在Session部分由开发者自己处理
  • 简易化初始化过程.
  • 修复failback模式BUG

gt3-python-sdk's People

Contributors

parcuse avatar lhtin avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.