FeaturesTemplatesShowcaseTownie
AI
BlogDocsPricing
Log inSign up
std
stdturso
Public
Like
10
turso
Home
Code
2
README.md
S
main.tsx
Branches
1
Pull requests
Remixes
1
History
Environment variables
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in miliseconds.
Sign up now
Code
/
Code
/
Search
README.md

Deprecated in favor of std/sqlite (also powered by Turso)

std/turso was the initial version of our integration with Turso. It was so popular, we rebuilt it to be faster and easier to use: std/sqlite.

turso (2).png

Turso is a serverless SQLite platform designed for the edge. It runs libSQL, their open contribution fork of SQLite.

Every Val Town user automatically gets their own Turso SQLite database! It's great for >100kb data (ie bigger than a val) or when you need SQL: relations, ACID transactions, etc.

Storage used in Turso will count against your Val Town total storage (10mb for free users; 1gb for Pro users). Contact us if you'd need more – it should be no problem!

Getting started

This val uses our public key auth scheme.

  1. Generate your keypair
  2. On your publicKey click the lock icon🔒 to change the permissions to Unlisted.
  3. Fork this helper function replacing stevekrouse with your own username
  4. Try out some queries!

Usage

This val returns a Turso SDK's Client, which supports execute, batch, and transaction.

Create val
await @me.turso().execute(`create table blobs( key text unique, value text )`)

More example usage

Architecture

This @std.turso function is the client or SDK to @std.tursoAPI, which acts as a "proxy" to Turso. It handles authentication, creates databases, and forwards on your SQL queries. You can get lower latency (~200ms vs ~800ms), more storage, databases, CLI & API access by having your own Turso account.

Migrated from folder: turso/turso

Code
README.md
S
main.tsx
Go to top
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Product
FeaturesPricing
Developers
DocsStatusAPI ExamplesNPM Package Examples
Explore
ShowcaseTemplatesNewest ValsTrending ValsNewsletter
Company
AboutBlogCareersBrandhi@val.town
Terms of usePrivacy policyAbuse contact
© 2025 Val Town, Inc.