Rockset's SQLAlchemy support and DB-API specification
Project description
rockset-sqlalchemy
This library implements Python's dbapi spec and provides SQLAlchemy support on top of Rockset.
Usage
To install the latest version of this package, run:
pip3 install rockset-sqlalchemy
To connect to the database:
from sqlalchemy import create_engine
engine = create_engine(
"rockset://",
connect_args={
"api_key": "{your api key}",
"api_server": "{your api server}"
"virtual_instance": "{your virtual instance ID}" # virtual_instance is optional
},
)
See some example queries here. See the SQLAlchemy Unified Tutorial here.
Development
Iterating on this library is very simple.
First, clone the source repository:
git clone https://github.com/rockset/rockset-sqlalchemy
Then, all you need to do is run sudo python3 setup.py develop
from the cloned directory and hack away.
You can use the example script example.py
to get started with development. Make sure you provide a ROCKSET_API_KEY
and ROCKSET_API_SERVER
to the script, like so
ROCKSET_API_KEY=xxx ROCKSET_API_SERVER=https://api.rs2.usw2.rockset.com python3 example.py
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
Built Distribution
File details
Details for the file rockset-sqlalchemy-0.0.1.tar.gz
.
File metadata
- Download URL: rockset-sqlalchemy-0.0.1.tar.gz
- Upload date:
- Size: 12.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f84b62e5987f6c14df86dba197726bd645822abcabf5c4c32e72cbe3bac3f357 |
|
MD5 | 4d465985524a04fa95afa4496151c5fd |
|
BLAKE2b-256 | b474c2b61d5f37754455d9318448fa32ccd650864ce3e8d3f6ea8e7ce8f82371 |
File details
Details for the file rockset_sqlalchemy-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: rockset_sqlalchemy-0.0.1-py3-none-any.whl
- Upload date:
- Size: 13.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fc5c3f12dbb75d5fc7536d67b7c18fa3be3f8de71379746a1a734fef0070c785 |
|
MD5 | 33a3276c2baf4160587817f30f923650 |
|
BLAKE2b-256 | b94787f7f4cb9261dd6ffbbf2770fae905ada15669a8296a9112c36f56910257 |