limbo/bindings/python
2025-12-02 18:32:32 +04:00
..
src cargo fmt 2025-12-02 18:18:14 +04:00
tests format and restructure for sync package 2025-12-02 18:32:32 +04:00
turso format and restructure for sync package 2025-12-02 18:32:32 +04:00
build.rs feat(python): add in-memory mode 2024-12-30 10:21:11 +01:00
Cargo.toml adjust python bindings 2025-12-02 16:03:06 +04:00
example.py bindings/python: Rename package to pyturso 2025-06-27 11:27:08 +03:00
py-bindings-sync.mdx implement simple turso-sync bindings for python 2025-12-02 17:18:46 +04:00
py-bindings-tests.mdx bit more tests and fix __init__ 2025-11-28 02:51:58 +04:00
py-bindings.mdx prompt fix just for the sake of consistency 2025-12-02 17:21:57 +04:00
pyproject.toml adjust python bindings 2025-12-02 16:03:06 +04:00
README.md Create README.md for Turso Database Python bindings 2025-11-13 20:19:50 -05:00
requirements-dev.txt bindings/python: Rename package to pyturso 2025-06-27 11:27:08 +03:00
requirements.txt bindings/python: Rename package to pyturso 2025-06-27 11:27:08 +03:00

Turso Database for Python

PyPI

Chat with other users of Turso on Discord


About

⚠️ Warning: This software is in BETA. It may still contain bugs and unexpected behavior. Use caution with production data and ensure you have backups.

Features

  • SQLite compatible: SQLite query language and file format support (status).
  • In-process: No network overhead, runs directly in your Python process
  • Cross-platform: Supports Linux, macOS, Windows

Installation

uv pip install pyturso

Getting Started

import turso

# Create/open a database
# con = turso.connect(":memory:") # For memory mode
con = turso.connect("sqlite.db")
cur = con.cursor()

# Create a table
cur.execute("""
  CREATE TABLE IF NOT EXISTS users (
    id INTEGER PRIMARY KEY AUTOINCREMENT,
    username TEXT NOT NULL
  )
""")
con.commit()

# Insert data
cur.execute("INSERT INTO users (username) VALUES (?)", ("alice",))
cur.execute("INSERT INTO users (username) VALUES (?)", ("bob",))
con.commit()

# Query data
res = cur.execute("SELECT * FROM users")
users = res.fetchall()
print(users)
# Output: [(1, 'alice'), (2, 'bob')]

License

This project is licensed under the MIT license.

Support