databend-py-0.3.9
توضیحات
Python driver with native interface for Databend
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | databend-py-0.3.9 |
| نام | databend-py |
| نسخه کتابخانه | 0.3.9 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Databend Cloud Team |
| ایمیل نویسنده | hantmac@outlook.com |
| آدرس صفحه اصلی | https://github.com/databendcloud/databend-py |
| آدرس اینترنتی | https://pypi.org/project/databend-py/ |
| مجوز | Apache License |
# databend-py
Databend Cloud Python Driver with native http interface support
[](https://pypi.org/project/databend-driver)
[](https://coveralls.io/github/databendcloud/databend-py?branch=master)
[](https://pypi.org/project/databend-py)
[](https://pypi.org/project/databend-py)
# Installation
pip install databend-py
# Usage
Use the next code to check connection:
> ``` python
> >>> from databend_py import Client
> >>> client = Client(
> host='tenant--warehouse.ch.datafusecloud.com',
> database="default",
> user="user",
> port="443",
> password="password")
> >>> print(client.execute("SELECT 1"))
> ```
The [host]{.title-ref}, [user]{.title-ref}, [password]{.title-ref} info
will be found in databend cloud warehouse connect page as flows:
Pure Client example:
> ``` python
> >>> from databend_pyimport Client
> >>>
> >>> client = Client('http://root:rootlocalhost:8081/db')
> >>>
> >>> client.execute('SHOW TABLES')
> [('test',)]
> >>> client.execute('DROP TABLE IF EXISTS test')
> []
> >>> client.execute('CREATE TABLE test (x Int32)')
> []
> >>> client.execute(
> ... 'INSERT INTO test (x) VALUES', [(1,)]
> ... )
> 1
> >>> client.execute('INSERT INTO test (x) VALUES', [(200,)])
> 1
> ```
# Features
- Basic SQL.
- TLS support.
- Query settings.
- Types support:
- Float32/64
- \[U\]Int8/16/32/64/128/256
- Date/Date32/DateTime(\'timezone\')/DateTime64(\'timezone\')
- String
- Array(T)
- Nullable(T)
- Bool
# Compatibility
- If databend version \>= v0.9.0 or later, you need to use databend-py
version \>= v0.3.0.
# License
Databend Python Driver is distributed under the [Apache
license]{.title-ref}.
نیازمندی
| مقدار | نام |
|---|---|
| - | pytz |
| - | mysql.connector |
| - | environs |
| - | requests |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.4, <4 | Python |
نحوه نصب
نصب پکیج whl databend-py-0.3.9:
pip install databend-py-0.3.9.whl
نصب پکیج tar.gz databend-py-0.3.9:
pip install databend-py-0.3.9.tar.gz