mixnode python开发包

mixnode-py-sdk的Python项目详细描述


概述

mixnodePythonsdk允许您 轻松地将mixnode restapi集成到python应用程序中。

要求

  • Python2及以上。
  • 来自Mixnode portal上注册用户的mixnode api密钥。

安装

pip install mixnode-py-sdk

教程

按照本教程查看分步指南和如何 使用mixnode python sdk。

从mixnode门户获取api密钥

  • Mixnode上创建帐户。
  • 如果已经注册,则登录并导航到API密钥页。
  • 仪表板->;从左侧菜单中选择API->;注意API键。
  • 或者,直接导航到https://www.mixnode.com/account/api查找 你的api密钥。

认证

这个sdk附带了基于https的基本身份验证,这需要您 在 客户端实例化。

基本身份验证

这种类型的令牌直接提供给应用程序。

frommixnodeimportMixnode# Create an instance of the Mixnode Clientclient=Mixnode("Your API Key")#add your API KEY here; available at https://www.mixnode.com/account/api

注意api_key也可以作为配置中的json对象传递 文件以避免在代码中指定密钥。请看 Examples

快速启动

frommixnodeimportMixnode,MixnodeErrortry:query="SELECT url, title from homepages LIMIT 10"response=Mixnode("Your API Key").execute(query)print(response)exceptMixnodeErroraserror:print(error)

mixnode的执行功能

execute是一个同步操作,它基于 分页mixnode sql api。

execute最多可接受两个参数:query、inputlimit(可选)。

请看各种各样的 Examples 有关用法的详细信息。

frommixnodeimportMixnode,MixnodeErrortry:response=Mixnode("Your API Key").execute(query)# Do something with responseexceptMixnodeErroraserror:# Do something with error
frommixnodeimportMixnode,MixnodeErrortry:# Fires a query and also sets the input limit on the data to be scannedresponse=Mixnode("Your API Key").execute(query,inputLimit)# Do something with responseexceptMixnodeErroraserror:# Do something with error

sdk调试

打开调试模式会记录发送到 混合节点API。这对于验证正在发送的查询是否 更正或验证查询是否正在执行。

# Setting debug to true logs the state of the application.# Do not use this in production.Mixnode("Your API Key").setDebug(True);

示例:mixnode python client

Examples

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java是否存在这样一种场景:Java7的Hashmap实现优于Java8的实现   java如何打印这些完整的数组?   java BuildException:未能执行aapt   java如何使用类。未知类型的集合返回的cast()   java准备语句返回错误的值   webview 安卓中的java显示身份验证对话框   java如何重命名列名JPA Hibernate   java查询从特定用户和特定时间段的Oracle表(通过比较原始表和备份表)中选择修改的行   java Youtube视频仅在三星S6设备上加载时自动暂停   未调用java RecyclerView getItemViewType   使用JSch setCommand执行带有源选项的java Shell ping命令时失败   java Hibernate:无法删除|删除分离的实例   Java Spring@MappedSuperclass字段作为子类中的@Id字段   java Android:确定单击了哪个按钮,因为该按钮未在xml中定义   如何计算java阵列内存使用率   使用Java查找按字母顺序排列的第一个字符串   javascript注销功能刷新页面,但页面仍已登录   当接口作为参数提供时,java依赖项注入不起作用   java中带原语的字符串扭曲