Sqlalchemy adapter for Databend
Project description
databend-sqlalchemy
Databend dialect for SQLAlchemy.
Installation
The package is installable through PIP::
pip install databend-sqlalchemy
Usage
The DSN format is similar to that of regular Postgres::
from sqlalchemy import create_engine, text
from sqlalchemy.engine.base import Connection, Engine
engine = create_engine(
f"databend://{username}:{password}@{host_port_name}/{database_name}?sslmode=disable"
)
connection = engine.connect()
result = connection.execute(text("SELECT 1"))
assert len(result.fetchall()) == 1
import connector
cursor = connector.connect('databend://root:@localhost:8000?sslmode=disable').cursor()
cursor.execute('SELECT * FROM test')
# print(cursor.fetchone())
# print(cursor.fetchall())
for i in cursor.next():
print(i)
Compatibility
If databend version >= v0.9.0 or later, you need to use databend-sqlalchemy version >= v0.1.0.
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 Distribution
databend_sqlalchemy-0.4.2.tar.gz
(16.2 kB
view details)
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_sqlalchemy-0.4.2.tar.gz.
File metadata
- Download URL: databend_sqlalchemy-0.4.2.tar.gz
- Upload date:
- Size: 16.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9f886f0a5d227083be8727b6a6dc48b69e7cb2b4218724287a8f4c3e5080d268
|
|
| MD5 |
0ef948e4a664d320f31b26eb6c2a2c8c
|
|
| BLAKE2b-256 |
4819d60cf4ffec41b32d7e013860c26d0b50677132be73bac5be16d6aef8a883
|
File details
Details for the file databend_sqlalchemy-0.4.2-py3-none-any.whl.
File metadata
- Download URL: databend_sqlalchemy-0.4.2-py3-none-any.whl
- Upload date:
- Size: 17.1 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 |
c8bc62ebd24920a6a511dbf20a9b01cff799d3d31f4206e144a4fffdf6bd8748
|
|
| MD5 |
104954fe6de512aa776111d60e05875d
|
|
| BLAKE2b-256 |
bb8097c6dd4f5c8e468b1f99ee330a1dfe2292cb4b901ae91dfbc24ae65c184e
|