sqlalchemy-cratedb¶
SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that gives application developers the full power and flexibility of SQL.
Python-based Dataframe libraries and ML frameworks, and a few ETL frameworks, are using SQLAlchemy as database adapter library when connecting to RDBMS.
The SQLAlchemy dialect for CrateDB is based on the HTTP-based DB API client library CrateDB Python Client.
Install
pip install --upgrade sqlalchemy-cratedb
Synopsis
import sqlalchemy as sa
engine = sa.create_engine("crate://localhost:4200", echo=True)
connection = engine.connect()
result = connection.execute(sa.text("SELECT * FROM sys.summits;"))
for record in result.all():
print(record)
See also
Documentation
The full documentation for the CrateDB SQLAlchemy dialect.
By example
Working with SQLAlchemy and CrateDB.
Example
An executable example using the SQLAlchemy dialect.