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.2.tar.gz
(16.6 kB
view hashes)
Built Distribution
Close
Hashes for databend_sqlalchemy-0.3.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | bcfcf58528d96185fb1d806eb0d1fd0e4fb7ee30d5767d22196875d29b2534a6 |
|
MD5 | aee867539724926750185aa6a982be24 |
|
BLAKE2b-256 | ee4df216593e4a6e2a56418af2bc886deb693b1c2e4bb7de3ad04025efa1c805 |
Close
Hashes for databend_sqlalchemy-0.3.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2fc2139bb99c6ee065fc86da6168c002a251ad8cfbd51f028575202f706bb9a8 |
|
MD5 | ce81bb937c80660152627a4fb2dd3a77 |
|
BLAKE2b-256 | eb52fc9fba8731a72ae7b7a72a3aff30bab71d83aed53f884652377c429356bb |