A Python package for working with SQLite databases in the cloud.
Project description
Python SDK for SqliteCloud
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
from sqlitecloud.types import 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_query(
"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
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
sqlitecloud-0.0.75.tar.gz
(19.3 kB
view hashes)
Built Distribution
Close
Hashes for SqliteCloud-0.0.75-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 082fb08f1864e67384f1537d92165da852a63d89e4ea2fe67328999083e659fc |
|
MD5 | 07860a2eba8fbc0f05c910b3d8f53354 |
|
BLAKE2b-256 | f7ca7ea63f139dcde0bd13c684062fff885151774e3146ba1472bf025c17be41 |