Files
turso/examples/python
2026-01-20 16:55:52 +05:30
..
2026-01-17 23:18:47 +05:30
2026-01-20 16:55:52 +05:30

Python Bindings Examples

Prerequisites

Build and install the Python bindings:

cd bindings/python
pip install maturin
maturin develop

basic.py

Basic example demonstrating local embedded database usage.

python examples/basic.py

sync_example.py

Demonstrates syncing with Turso Cloud, including optional remote encryption support.

export TURSO_REMOTE_URL="http://your-db.localhost:8080"
export TURSO_AUTH_TOKEN="your-auth-token"  # optional
export TURSO_REMOTE_ENCRYPTION_KEY="base64-encoded-key"  # optional
python examples/sync_example.py