Databend dialect for SQLAlchemy.
Project description
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 Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Close
Hashes for databend_sqlalchemy-0.2.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e50afe6dcb0c97830560ba8b9f0160d95f4e3b7199ad1955ee9c339fb28b91e6 |
|
MD5 | 773ad9ff759fc87df436c87b803251db |
|
BLAKE2b-256 | cc3da2f34263f2067193b460b4181a47a53d4973e95597e09b5f67d7e631ae1a |