Client SDK for SquirrelDB realtime database
Project description
SquirrelDB Python SDK
Official Python client for SquirrelDB.
Installation
pip install squirreldb
Quick Start
from squirreldb import SquirrelDB
import os
db = SquirrelDB(
host="localhost",
port=8080,
token=os.environ.get("SQUIRRELDB_TOKEN")
)
db.connect()
# Insert a document
user = db.table("users").insert({
"name": "Alice",
"email": "alice@example.com"
})
print(f"Created user: {user['id']}")
# Query documents
active_users = db.table("users").filter("u => u.status === 'active'").run()
# Subscribe to changes (async)
import asyncio
async def watch_messages():
async for change in db.table("messages").changes():
print(f"Change: {change['operation']} - {change['newValue']}")
asyncio.run(watch_messages())
Documentation
Visit squirreldb.com/docs/sdks for full documentation.
License
Apache License 2.0 - see LICENSE for details.
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
squirreldb_sdk-0.1.0.tar.gz
(12.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file squirreldb_sdk-0.1.0.tar.gz.
File metadata
- Download URL: squirreldb_sdk-0.1.0.tar.gz
- Upload date:
- Size: 12.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3933c6e5cdef71a6dcbc372632444e71fb77aca1c2d02fcc67dd9752602ceaa0
|
|
| MD5 |
86654688ab66dd5834de6a358bd345b7
|
|
| BLAKE2b-256 |
3ae03eaf991f135f2294d3898278f230ee3b7dc96f07db8eec36994f206f6c37
|
File details
Details for the file squirreldb_sdk-0.1.0-py3-none-any.whl.
File metadata
- Download URL: squirreldb_sdk-0.1.0-py3-none-any.whl
- Upload date:
- Size: 11.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d4e20a59b3e93febd2e1c89b6ea7c054c194f374329962bc0b4163fbb15beacb
|
|
| MD5 |
7c92b8f2113ae18c4ccbefbc1ca2ea4a
|
|
| BLAKE2b-256 |
d1a54cd071e8b1f118eee1c4af97294b2600367cfa7425bae7b4a17340009ffa
|