wispfnDocs
Store data

Every project has private key-value, table and file storage with no setup. Learn which to use and how quotas work.

Functions have no persistent disk, so anything that must survive between requests goes in Wisp's storage. Every project gets three kinds, private to the project:

UseWhenExample
Key-valueLook things up by a known key; counters; caches; flagssession:abc, ratelimit:1.2.3.4, config:theme
TablesRecords you list, filter or editorders, signups, tickets, users
FilesBinary data or anything bigger than 256 KBuploads, images, PDFs, CSV exports

Import them from the SDK:

import { kv, table, file } from 'wisp';
from wisp import kv, table, file

#Test and live share data

The draft (?test) and the live version read and write the same storage. That makes it easy to test with real data, but be careful with tests that write or delete.

#Browse your data

The Storage section of a project shows:

  • Key-Value — keys grouped into collections by their prefix (todo:42 is in the todo collection).
  • Tables — each table's rows, newest first.
  • Blobs — files grouped by top-level folder.

You can inspect and delete entries from there.

#Quota

All storage of all projects in a workspace counts toward the plan's allowance (1 GB during the trial, 2 GB on Starter, 10 GB on Pro, 25 GB on Business). Beyond it, storage credits are used by the hour. When the workspace is over its allowance and has no storage credits, writes throw an error that starts with Storage is full; reads and deletes keep working. See Plans and credits.

#When to use an external database

Wisp's storage suits app data up to tens of thousands of records. For relational queries, full-text search or large analytical datasets, use a hosted database and store its credentials as secrets.