Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rockset-sqlalchemy-0.0.1.tar.gz (12.2 kB view hashes)

Uploaded Source

Built Distribution

rockset_sqlalchemy-0.0.1-py3-none-any.whl (13.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page