# Turso SDKs

> Turso SDKs — Turso documentation.
> Canonical HTML: https://tursodb.cn/docs/sdk/introduction/
> Upstream Source (MIT): https://docs.turso.tech/sdk/introduction
> Language: en

---
## Which package should I use?

Two rules cover almost every case:

1. **If a local database is involved, use the Turso packages.** That means fully local databases (embedded, on-device, offline) and local databases that sync with the cloud — even when the database on the other side is libSQL.
2. **If your application only talks to a cloud database over the network, match the driver to the database engine.** [Turso databases](/docs/tursodb/quickstart/) use the serverless drivers; [libSQL](/docs/libsql/) databases use the libSQL clients.

| Use case | TypeScript | Python | Go | Rust |
| - | - | - | - | - |
| **Local database** (embedded, on-device, offline) | `@tursodatabase/database` | `pyturso` | `tursogo` | `turso` |
| **Local database + cloud sync** (push/pull) | `@tursodatabase/sync` | `pyturso` (with sync) | `tursogo` (with sync) | `turso` (with `sync` feature) |
| **Remote Turso database** (over-the-wire) | `@tursodatabase/serverless` | `turso_serverless` | `tursogo-serverless` | `turso_serverless` |
| **Remote libSQL database** (over-the-wire) | `@libsql/client` | `libsql` | `libsql-client-go` | `libsql` (with `remote` feature) |

**Starting a new project?** Use `@tursodatabase/database` (TypeScript), `pyturso` (Python), `tursogo` (Go), or `turso` (Rust). These are built on the Turso engine — the ground-up rewrite of SQLite with concurrent writes, async I/O, and local-first sync.

**Need sync?** Use [Turso Sync](/docs/sync/usage/) for local reads and writes with explicit `push()` / `pull()` to Turso Cloud.

**Using an ORM?**

* **TypeScript** — Drizzle and Prisma run on `@libsql/client` with production-ready support from all major ORMs in the ecosystem.
* **Rust** — [Toasty](/docs/sdk/rust/orm/toasty/), the async ORM from the Tokio project, has a native Turso driver built on the `turso` crate.
* **Python** — see the [SQLAlchemy guide](/docs/sdk/python/orm/sqlalchemy/).

**Migrating from SQLite?** Turso is a drop-in replacement. Your existing SQL, schema, and queries work unchanged.

**Already using `@libsql/client`, `libsql`, or `go-libsql`?** These packages are built on [libSQL](https://github.com/tursodatabase/libsql), the open-source fork of SQLite that has powered Turso Cloud for years. They are production-ready and battle-tested, and remain the recommended way to access libSQL databases remotely. If your workload needs concurrent writes, push/pull sync, or local-first writes (offline / multi-writer / bidirectional), consider a Turso database and its packages instead.

### The serverless drivers

The serverless drivers speak SQL over HTTP — no persistent connections, no native libraries. They work anywhere your language runs: servers, Docker containers, serverless functions, and edge runtimes. Each mirrors the API of its embedded counterpart, so code moves between local and remote with minimal changes.

<div class="doc-callout doc-callout-info"><div class="doc-callout-title">NOTE</div><div class="doc-callout-body">

**Need sync?** For new projects, use [Turso Sync](/docs/sync/usage/) — it gives you local reads and writes with explicit `push()` / `pull()` to the cloud. The libSQL-based SDKs below also support Embedded Replicas, where reads are local and writes are sent to the cloud primary.

</div></div>


## Official SDKs

<div class="doc-cards">
<a class="doc-card" href="/docs/sdk/ts/quickstart/"><div class="doc-card-title"><span>TypeScript</span><span class="doc-card-arrow" aria-hidden="true">→</span></div></a>
<a class="doc-card" href="/docs/sdk/rust/quickstart/"><div class="doc-card-title"><span>Rust</span><span class="doc-card-arrow" aria-hidden="true">→</span></div></a>
<a class="doc-card" href="/docs/sdk/go/quickstart/"><div class="doc-card-title"><span>Go</span><span class="doc-card-arrow" aria-hidden="true">→</span></div></a>
<a class="doc-card" href="/docs/sdk/python/quickstart/"><div class="doc-card-title"><span>Python</span><span class="doc-card-arrow" aria-hidden="true">→</span></div></a>
<div class="doc-card doc-card-static"><div class="doc-card-title"><span>Android</span></div></div>
<a class="doc-card" href="/docs/sdk/swift/quickstart/"><div class="doc-card-title"><span>Swift</span><span class="doc-card-arrow" aria-hidden="true">→</span></div></a>
<a class="doc-card" href="/docs/sdk/php/quickstart/"><div class="doc-card-title"><span>PHP</span><span class="doc-card-arrow" aria-hidden="true">→</span></div></a>
<div class="doc-card doc-card-static"><div class="doc-card-title"><span>Ruby</span></div></div>
<div class="doc-card doc-card-static"><div class="doc-card-title"><span>Ruby on Rails</span></div></div>
<div class="doc-card doc-card-static"><div class="doc-card-title"><span>C</span></div></div>
</div>

## Community SDKs

These SDKs are community-driven and don't come with official Turso support.

<div class="doc-cards">
<a class="doc-card" href="/docs/sdk/flutter/quickstart/"><div class="doc-card-title"><span>Flutter / Dart</span><span class="doc-card-arrow" aria-hidden="true">→</span></div></a>
<a class="doc-card" href="https://capawesome.io/plugins/libsql" target="_blank" rel="noopener noreferrer"><div class="doc-card-title"><span>Capacitor</span><span class="doc-card-arrow" aria-hidden="true">↗</span></div></a>
<a class="doc-card" href="https://op-engineering.github.io/op-sqlite/" target="_blank" rel="noopener noreferrer"><div class="doc-card-title"><span>React Native / OP-SQLite</span><span class="doc-card-arrow" aria-hidden="true">↗</span></div></a>
<a class="doc-card" href="https://github.com/richan-fongdasen/turso-laravel" target="_blank" rel="noopener noreferrer"><div class="doc-card-title"><span>Laravel</span><span class="doc-card-arrow" aria-hidden="true">↗</span></div></a>
<a class="doc-card" href="https://github.com/tvandinther/libsql-client-dotnet" target="_blank" rel="noopener noreferrer"><div class="doc-card-title"><span>.NET</span><span class="doc-card-arrow" aria-hidden="true">↗</span></div></a>
<a class="doc-card" href="https://github.com/dbeaver/dbeaver-jdbc-libsql" target="_blank" rel="noopener noreferrer"><div class="doc-card-title"><span>Java</span><span class="doc-card-arrow" aria-hidden="true">↗</span></div></a>
<a class="doc-card" href="https://github.com/DaBigBlob/libsql-stateless-easy" target="_blank" rel="noopener noreferrer"><div class="doc-card-title"><span>Stateless libSQL</span><span class="doc-card-arrow" aria-hidden="true">↗</span></div></a>
</div>


## SQL over HTTP

<div class="doc-card doc-card-static"><div class="doc-card-title"><span>SQL over HTTP</span></div></div>
      <path
        d="m119.2 82.2 6.5-1.5c2.9-.7 5.8 1.2 6.5 4.1.2.8.2 1.6 0 2.4l-1.5 6.5c-3.3 12.4-21.1 8.4-18.8-4.2.8-3.8 3.8-6.5 7.3-7.3z"
        fill="#1ebca1"
      />
      <path
        d="m21.1 191.8 99.8-99.8"
        fill="none"
        stroke="#1ebca1"
        stroke-linecap="round"
        stroke-linejoin="round"
        stroke-width="19.2"
      />
      <g fill="#1ebca1">
        <path d="m141.8 142.4c-1.4 1.4-3.5 1.9-5.4 1.3l-13.3-4.4c-2-.7-4.3-.1-5.8 1.4l-8.9 8.9c-1.8 1.8-1.1 4.8 1.3 5.6l20.6 6.8c8.9 2.9 18.4.6 25-5.9" />
        <path d="m107 177.2c-1.4 1.4-3.5 1.9-5.4 1.3l-14.6-4.8c-1.2-.4-2.5 0-3.4.8l-9.9 9.9c-1.8 1.8-1.1 4.8 1.3 5.6l20.6 6.8c8.9 2.9 18.4.6 25-5.9" />
        <path d="m175.2 109c-1.4 1.4-3.5 1.9-5.4 1.3l-13.3-4.4c-2-.7-4.3-.1-5.8 1.4l-8.9 8.9c-1.8 1.8-1.1 4.8 1.3 5.6l20.6 6.8c8.9 2.9 18.4.6 25-5.9" />
      </g>
    </svg>
  }
  href="/sdk/http/quickstart"
/>
