VanillaDatabase Python SDK
Official Python client for VanillaDatabase (VanillaDB) - Multi-Tenant SQLite Cloud Engine with Realtime Event Subscriptions, Database-Scoped Media Storage, AI Vector Search, and Batch Transactions.
Installation
pip install vanilladatabase
Quickstart
import os
from vanilladb import VanillaDatabase
# 1. Initialize Client
db = VanillaDatabase(
url=os.getenv("VANILLA_DB_URL", "http://localhost:3000/v1/databases/db_your_database_id"),
token=os.getenv("VANILLA_DB_TOKEN", "vdb_live_your_api_token_here")
)
# 2. Table CRUD Builder (No SQL needed)
# Insert row
db.table("users").insert({"username": "elaina", "score": 250})
# Select rows
users = db.table("users").select(limit=10, order_by="score", order="DESC")
print("Top Users:", users["rows"])
# Delete row
db.table("users").delete({"id": 1})
# 3. AI Vector Cosine Similarity Search
matches = db.vector_search(
table="documents",
vector_column="embedding",
vector=[0.12, 0.45, -0.23, 0.89],
limit=5,
threshold=0.75
)
print("Vector Matches:", matches)
# 4. Parameterized Raw SQL Query
result = db.query("SELECT * FROM users WHERE score >= ?", [100])
print("Users:", result["rows"])
# 5. Atomic Batch Transaction
db.batch([
{"sql": "UPDATE users SET score = score - ? WHERE id = ?", "params": [50, 1]},
{"sql": "INSERT INTO logs (event) VALUES (?)", "params": ["score_deducted"]}
], transaction=True)
# 6. Media Storage (Upload, Stream & Delete)
file_info = db.upload_file("avatar.png", filename="avatar.png", content_type="image/png")
print("Stream URL (Range 206):", db.get_file_url(file_info["id"]))
db.delete_file(file_info["id"])
# 7. Realtime SSE Event Stream
def on_event(event):
print("Live Event:", event)
# Blocking subscription:
# db.subscribe(on_event, table="users")
Metadata
Release files for vanilladatabase 1.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| vanilladatabase-1.2.0.tar.gz | 4.1 kB | Without provenance | Details for vanilladatabase-1.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| vanilladatabase-1.2.0-py3-none-any.whl | Python 3 | none | any | Details for vanilladatabase-1.2.0-py3-none-any.whl |
Total release size: 8.5 kB
Release files / vanilladatabase-1.2.0.tar.gz
| Download URL | vanilladatabase-1.2.0.tar.gz |
|---|---|
| Size | 4.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4ed6ad6a6d6242da2507fa70af75beba4a9fbff6dba9af5bb559c08d8c7d2c4a
|
|
BLAKE2b-256 checksum How to use checksums |
ae1f8511cb69dd8859854dedd5439c6e39a89b2ce0fd76c1d5cc53a42155e742
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.16
|
Release files / vanilladatabase-1.2.0-py3-none-any.whl
| Download URL | vanilladatabase-1.2.0-py3-none-any.whl |
|---|---|
| Size | 4.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
90de1a374131fd1b64db139c9279396c04cafadd14137cc8c3e03886b4be9cbf
|
|
BLAKE2b-256 checksum How to use checksums |
a5a103f9c12318ef2c8a66557900393d550713e805c1872d9ffe505617eb6434
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.16
|
Security for vanilladatabase 1.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.