SDK Overview
The Taruvi SDK provides official client libraries for Python and JavaScript/TypeScript. Build applications faster with type-safe, developer-friendly APIs that handle authentication, data management, storage, functions, and more.
Available SDKs
| Language | Package | Version | Documentation |
|---|---|---|---|
| Python | taruvi | 1.x | PyPI |
| JavaScript/TypeScript | @taruvi/sdk | 1.2.0 | npm |
Installation
- Python
- JavaScript/TypeScript
pip install taruvi
Requirements: Python 3.10 or higher
npm install @taruvi/sdk
Requirements: Node.js 18+ or modern browsers
Quick Example
- Python
- JavaScript/TypeScript
from taruvi import Client
# Initialize client
client = Client(
api_url="https://api.taruvi.cloud",
app_slug="my-app"
)
# Authenticate
auth_client = client.auth.signInWithPassword(
username="alice@example.com",
password="secret123"
)
# Query database
users = auth_client.database.query("users").filter("status", "eq", "active").get()
# Upload file
auth_client.storage.from_("documents").upload(
files=[("report.pdf", open("report.pdf", "rb"))],
paths=["uploads/report.pdf"]
)
# Execute function
result = auth_client.functions.execute("send-email", params={"user_id": 123})
import { Client, Database, Storage, Functions } from '@taruvi/sdk'
// Initialize client
const client = new Client({
apiKey: "site-api-key",
appSlug: "my-app",
baseUrl: "https://api.taruvi.cloud"
})
// Query database
const db = new Database(client)
const users = await db.from("users").filter({ status: "active" }).execute()
// Upload file
const storage = new Storage(client)
await storage.from("documents").upload({
files: [file],
paths: ["uploads/report.pdf"]
}).execute()
// Execute function
const functions = new Functions(client)
const result = await functions.execute("send-email", { params: { user_id: 123 } })
Why Use the SDK?
- ✅ Type-Safe: Full TypeScript and Python type hints for IDE autocomplete
- ✅ Auto Authentication: Handles JWT tokens, refresh, and session management
- ✅ Error Handling: Comprehensive exception hierarchy with clear messages
- ✅ Performance: Connection pooling, automatic retries, efficient HTTP clients
- ✅ Consistent APIs: Clean, intuitive interfaces across all features
Next Steps
Community & Support
- GitHub: Report bugs or request features
- Python SDK: taruvi-python-sdk
- JavaScript SDK: taruvi-js-sdk
- Documentation: Browse comprehensive guides and tutorials
- Examples: Check out the Examples Cookbook