Skip to main content

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


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)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

squirreldb_sdk-0.1.0-py3-none-any.whl (11.2 kB view details)

Uploaded Python 3

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

Hashes for squirreldb_sdk-0.1.0.tar.gz
Algorithm Hash digest
SHA256 3933c6e5cdef71a6dcbc372632444e71fb77aca1c2d02fcc67dd9752602ceaa0
MD5 86654688ab66dd5834de6a358bd345b7
BLAKE2b-256 3ae03eaf991f135f2294d3898278f230ee3b7dc96f07db8eec36994f206f6c37

See more details on using hashes here.

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

Hashes for squirreldb_sdk-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d4e20a59b3e93febd2e1c89b6ea7c054c194f374329962bc0b4163fbb15beacb
MD5 7c92b8f2113ae18c4ccbefbc1ca2ea4a
BLAKE2b-256 d1a54cd071e8b1f118eee1c4af97294b2600367cfa7425bae7b4a17340009ffa

See more details on using hashes here.

Supported by

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