用于访问托管平台的doorda sdk

doorda-sdk的Python项目详细描述


doorda python开发包

要求

安装

Pypi

$ pip install doorda-sdk

来源

下载位置:

  1. https://github.com/Doorda/doorda-python-sdk/releases
$ wget https://github.com/Doorda/doorda-python-sdk/archive/1.0.10.zip

$ unzip 1.0.10.zip

安装

$ python setup.py install

用法

门主机

  1. 连接到数据库

    fromdoorda_sdk.hostimportclientconn=client.connect(username="username",password="password",catalog="catalog_name",schema="schema_name")cursor=conn.cursor()
  2. 执行查询

    cursor.execute("SELECT * FROM table_name")# Returns generator of results# Does not put result into memory. Iterates through rows in a streaming fashion.forrowincursor.iter_result():# Do something with row# Fetch all resultsrows=cursor.fetchall()# Fetch one resultsrows=cursor.fetchone()# Fetch multiple resultsrows=cursor.fetchmany(size=10)# Get list of column namescursor.col_names# Get column names mapped to data typescursor.col_types
  3. 简化功能

    # Check database connectionresults=cursor.is_connected()# List all catalogsrows=cursor.show_catalogs()# List all tablesrows=cursor.show_tables("catalog_name","schema_name")# Get number of rowsrows=cursor.table_stats(catalog="catalog_name",schema="schema_name",table="table_name")

了解更多信息

要了解doordahost的更多信息,请前往https://github.com/Doorda/Getting-Started

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

推荐PyPI第三方库


热门话题
java刷新系统。用自己的记录器输出   使用Jython将参数从Java传递到Python   JavaSocksV4代理   java如何使用通知?   java@DirtiesConext不工作   java将多个jar组合成一个(使用maven)   java使用相等运算符比较两个类   java我怎样才能让两个JOptionPane一起出现在我的第一页上,并让它们在两个页面上都有正确的答案?   html无法访问java中资产文件夹内的文件   通过post命令向SpringWebApp发送对象时,java对象字段为null   单个实例中静态变量的类更改值(Java)   java解决方案是什么   试图检查网站所有受支持的密码套件的安全性,在java中遇到chacha20和poly1035问题