A Python package for working with SQLite databases in the cloud.
Project description
Python SDK for SQLite Cloud
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.
- Site: https://sqlitecloud.io
- Documentation: https://...coming!
- Source: https://github.com/sqlitecloud/python
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?apikey=myapikey")
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)
Specific value
result.get_value(0, 0)
Column name
result.get_name(0)
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.77.tar.gz
(19.3 kB
view hashes)
Built Distribution
Close
Hashes for SqliteCloud-0.0.77-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | de443526665fe78e9cc26cfa714f7c6fe0f0d0951a5c4d77cfce16fe8ea776d6 |
|
MD5 | 6baf88ac719d6f4d5e51bb3ef2b8a6eb |
|
BLAKE2b-256 | c20846da2692f869d495956a7846a1c983cf926ac79adc560a0c26648ce11d2b |