【文件属性】:
文件名称:trino-python-client:Trino 的 Python 客户端
文件大小:40KB
文件格式:ZIP
更新时间:2021-08-05 05:21:25
Python
介绍
这个包提供了一个客户端接口来查询一个分布式 SQL 引擎。 它支持 Python>=3.6 和 pypy。
安装
$ pip install trino
快速开始
使用DBAPI接口查询Trino:
import trino
conn = trino . dbapi . connect (
host = 'localhost' ,
port = 8080 ,
user = 'the-user' ,
catalog = 'the-catalog' ,
schema = 'the-schema' ,
)
cur = conn . cursor ()
cur . execute ( 'SELECT * FROM system.runtime.nodes' )
rows = cur . fetchall ()
这将查询system.runtim
【文件预览】:
trino-python-client-master
----integration_tests()
--------conftest.py(6KB)
--------test_dbapi.py(12KB)
----.github()
--------workflows()
----tests()
--------test_http.py(1KB)
--------test_exceptions.py(2KB)
--------test_client.py(21KB)
----tox.ini(115B)
----LICENSE(11KB)
----setup.cfg(367B)
----trino()
--------constants.py(1KB)
--------auth.py(5KB)
--------dbapi.py(16KB)
--------client.py(19KB)
--------__init__.py(778B)
--------logging.py(765B)
--------transaction.py(3KB)
--------exceptions.py(5KB)
----setup.py(3KB)
----.gitignore(2KB)
----README.md(6KB)