Skip to main content

Turso + SQLAlchemy

Turso + SQLAlchemy (experimental)

This package is experimental, which means it is not consider to be production grade. Furthermore, the package currently only supports Linux and macOS.

SQLite for Production. Powered by libSQL.

Turso · Quickstart · Examples · Docs · Discord · Blog & Tutorials

PyPI discord activity


Examples

Embedded Replica

import os
from sqlalchemy import create_engine

engine = create_engine(
     "sqlite+libsql:///embedded.db",
     connect_args={
         "auth_token": os.getenv("TURSO_AUTH_TOKEN"),
         "sync_url": f"{os.getenv("TURSO_DATABASE_URL")}",
     },
)

Remote Database

import os
from sqlalchemy import create_engine

engine = create_engine(
    f"sqlite+libsql://{os.getenv("TURSO_DATABASE_URL")}?secure=true",
    connect_args={
        "auth_token": os.getenv("TURSO_AUTH_TOKEN"),
    },
)

In-Memory Database

from sqlalchemy import create_engine

engine = create_engine("sqlite+libsql://")

Local Database

from sqlalchemy import create_engine

engine = create_engine("sqlite+libsql:///local.db")

Documentation

  1. Turso Quickstart — Learn how create and connect your first database.
  2. SDK Quickstart — Learn how to install and execute queries using the libSQL client.
  3. SDK Reference — Dive deeper with the libSQL SDK reference and examples.

What is Turso?

Turso is a SQLite-compatible database built on libSQL, the Open Contribution fork of SQLite. It enables scaling to hundreds of thousands of databases per organization and supports replication to any location, including your own servers, for microsecond-latency access.

Learn more about what you can do with Turso:

Metadata

Release files for sqlalchemy-libsql 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sqlalchemy-libsql 0.2.0
File Size Uploaded
sqlalchemy_libsql-0.2.0.tar.gz 6.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for sqlalchemy-libsql 0.2.0
File Interpreter ABI Platform
sqlalchemy_libsql-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 12.3 kB

Release files / sqlalchemy_libsql-0.2.0.tar.gz

Download URL sqlalchemy_libsql-0.2.0.tar.gz
Size 6.4 kB
Tags Source
SHA-256 checksum
How to use checksums
f6349c89ea10b941a9cd87ebb65330c660aff996c12d3da7e1696572c360edd1
BLAKE2b-256 checksum
How to use checksums
9c3ea628dad23a5310e00db674a5ddf92300acb4199a06ea82385cc48f6e9289
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.5.21

Release files / sqlalchemy_libsql-0.2.0-py3-none-any.whl

Download URL sqlalchemy_libsql-0.2.0-py3-none-any.whl
Size 5.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
852a731c64f318581942c81a5e18c9752a553af25608abbff04cd54ae1f3d451
BLAKE2b-256 checksum
How to use checksums
a2b97a3b645766a9f0f2ba27580d1ec6eb1ade754b30f0c88fcc6bee4cc2cb20
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.5.21

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page