Skip to main content

SQLAlchemy dialect for libSQL

Project description

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:

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sqlalchemy_libsql-0.2.0.tar.gz (6.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sqlalchemy_libsql-0.2.0-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

Details for the file sqlalchemy_libsql-0.2.0.tar.gz.

File metadata

  • Download URL: sqlalchemy_libsql-0.2.0.tar.gz
  • Upload date:
  • Size: 6.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.21

File hashes

Hashes for sqlalchemy_libsql-0.2.0.tar.gz
Algorithm Hash digest
SHA256 f6349c89ea10b941a9cd87ebb65330c660aff996c12d3da7e1696572c360edd1
MD5 ce406a8805094394e00c77de253af4f1
BLAKE2b-256 9c3ea628dad23a5310e00db674a5ddf92300acb4199a06ea82385cc48f6e9289

See more details on using hashes here.

File details

Details for the file sqlalchemy_libsql-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for sqlalchemy_libsql-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 852a731c64f318581942c81a5e18c9752a553af25608abbff04cd54ae1f3d451
MD5 eed61b48b13e23c61d370e4720c4e8bc
BLAKE2b-256 a2b97a3b645766a9f0f2ba27580d1ec6eb1ade754b30f0c88fcc6bee4cc2cb20

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page