Skip to main content

A Python package for working with SQLite databases in the cloud.

Project description

Python SDK for SqliteCloud

Build Status Jupyter Notebook

SQLiteCloud is a powerful Python package that allows you to interact with the SQLite Cloud backend server seamlessly. It provides methods for various database operations. This package is designed to simplify database operations in Python applications, making it easier than ever to work with SQLite Cloud.

Installation

You can install SqliteCloud Package using Python Package Index (PYPI):

$ pip install SqliteCloud

Usage


from sqlitecloud.client import SqliteCloudClient, SqliteCloudAccount

Init a connection

Using explicit configuration

account = SqliteCloudAccount(user, password, host, db_name, port)
client = SqliteCloudClient(cloud_account=account)
conn = client.open_connection()

Using string configuration

account = SqliteCloudAccount("sqlitecloud://user:pass@host.com:port/dbname?timeout=10&key2=value2&key3=value3")
client = SqliteCloudClient(cloud_account=account)
conn = client.open_connection()

Execute a query

You can bind values to parametric queries: you can pass parameters as positional values in an array

result = client.exec_statement(
    "SELECT * FROM table_name WHERE id = ?",
    [1],
    conn=conn
)

Iterate result

result is an iterable object

for row in result:
    print(row)

Close connection

client.disconnect(conn)

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

SqliteCloud-0.0.30.tar.gz (10.5 kB view hashes)

Uploaded Source

Built Distribution

SqliteCloud-0.0.30-py3-none-any.whl (10.9 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