RisingWave dialect for SQLAlchemy
Maintained. Last release 5 months ago, commits in 2 of the last 26 weeks. Weaker on commit activity and release cadence.
pip install sqlalchemy-risingwaveRisingWave dialect for SQLAlchemy
SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that gives application developers the full power and flexibility of SQL. https://www.sqlalchemy.org/
RisingWave is a cloud-native streaming database that uses SQL as the interface language. It is designed to reduce the complexity and cost of building real-time applications. https://www.risingwave.com
Prerequisites
For psycopg2 support you must install either:
-
psycopg2, which has some prerequisites of its own.
(The binary package is a practical choice for development and testing but in production it is advised to use the package built from sources.)
Install
Install via PyPI
pip install sqlalchemy-risingwave
Recommend install packages locally like below. If directly from PyPI, the version may not be the most updated.
python setup.py sdist bdist_wheel # generate dist
pip install -e . # install this package
Usage
sqlalchemy-risingwave will work like a plugin to be placed into runtime sqlalchemy lib, so that we can overrides some code path to change the behaviour to better fits these python clients with RisingWave.
See how to use with Superset: doc
Async support
Released in v2.1.0. RisingWave can now be driven from SQLAlchemy 2.0's
async engine API via the psycopg3 driver. Install the dialect with the
optional psycopg3 extra:
pip install -U "sqlalchemy-risingwave[psycopg3]"
The benefit is Python-side concurrency: while one query is waiting on network I/O, the event loop can run other coroutines. This is useful for FastAPI / Starlette-style services that need many concurrent RisingWave queries from one process. It does not make a single RisingWave query execute faster, and it does not change RisingWave's streaming read-after-write visibility (see ).