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}?secure=false"
)
connection = engine.connect()
result = connection.execute(text("SELECT 1"))
assert len(result.fetchall()) == 1
import connector
cursor = connector.connect('http://root:@localhost:8081').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.3.1.tar.gz
(16.9 kB
view hashes)
Built Distribution
Close
Hashes for databend_sqlalchemy-0.3.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 949c3f1c31a56597b9300be0291e6e3d41cf38b9701a1a9d5dc2154ffbb19f73 |
|
MD5 | b2ae08fe7bc12522fb35d776ed220f58 |
|
BLAKE2b-256 | 0da9ba1c8551276825e6346bd755634e958f77b016bdad06113cb26c692a1b96 |
Close
Hashes for databend_sqlalchemy-0.3.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f886fdbaa5281deda6d6bdcd02ea5847be04b9e85d5db89af934d727ef22b485 |
|
MD5 | a3d1d1315c962b7a8e8bd9469a7b33b9 |
|
BLAKE2b-256 | c1f146d863069577afd639b39789b34f6630034e5d0133e14773631db434e440 |