Add your description here
Project description
databend-py
Databend Cloud Python Driver with native http interface support
Installation
pip install databend-py
Usage
Use the next code to check connection:
>>> from databend_py import Client >>> client = Client( host='tenant--warehouse.ch.datafusecloud.com', database="default", user="user", port="443", secure=True, password="password",settings={"copy_purge":True,"force":True}) >>> 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:
>>> from databend_py import Client >>> >>> client = Client.from_url('http://root@localhost:8000/db?secure=False©_purge=True') >>> >>> client.execute('SHOW TABLES') [[], [('test',)]] >>> client.execute("show tables",with_column_types=True) [[('Tables_in_default', 'String')], [('test',)]] # [[(column_name, column_type)], [(data,)]] >>> 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
More usages examples find here.
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}.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file databend_py-0.6.4-py3-none-any.whl.
File metadata
- Download URL: databend_py-0.6.4-py3-none-any.whl
- Upload date:
- Size: 25.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
38fc8725a42245724699a133ded467f276b5c83642ca5b6b90f5adee93665e89
|
|
| MD5 |
de39ef7066931c4fc0fcde1b27371517
|
|
| BLAKE2b-256 |
df90309bceaf3279e71270371f84e3d6fc1ff32da756c61e96e2fd760e886ade
|