Skip to main content

walkindb is the database for agents — a private SQL database provisioned in one HTTP call, no signup, 10-minute TTL.

Project description

walkindb

Python client for walkindb — the database for agents.

A single HTTP call provisions a private SQLite database with a 10-minute TTL. No signup, no API key, no credit card.

Install

pip install walkindb

Zero runtime dependencies — the client uses only the Python standard library, so it installs cleanly inside any agent sandbox.

Use

from walkindb import Client

db = Client()
db.execute("CREATE TABLE notes(id INTEGER PRIMARY KEY, body TEXT)")
db.execute("INSERT INTO notes(body) VALUES('hello')")
result = db.execute("SELECT * FROM notes")
print(result.columns)       # ['id', 'body']
print(result.rows)          # [[1, 'hello']]
print(result.rows_affected) # 0 for SELECT, N for INSERT/UPDATE/DELETE

# The session token lives on the Client instance and is reused on subsequent
# calls, so you keep reaching the same walk-in database until its 10-minute
# TTL expires. `db.session` holds the token; `db.expires_at` is the unix
# timestamp at which the instance will be deleted.
print(db.session, db.expires_at)

If you want a fresh walk-in:

db.reset_session()
db.execute("SELECT 1")  # provisions a new instance

Errors

Non-2xx responses raise WalkinDBError with status and error attributes. Notable codes:

  • 400 — invalid JSON, missing sql, forbidden keyword, or SQL syntax error
  • 404 — session token unknown, tampered, or expired (walkindb returns 404, not 401, on all session failures to prevent enumeration)
  • 408 — query exceeded the 2-second wall-clock timeout
  • 413 — request body exceeded the 8 KB cap
  • 429 — rate limit exceeded (60 req/min, 10 new instance creations/min per IP)
  • 507 — instance storage quota exceeded (10 MB per walk-in)
from walkindb import Client, WalkinDBError

db = Client()
try:
    db.execute("SELECT * FROM does_not_exist")
except WalkinDBError as e:
    print(f"error {e.status}: {e.error}")

Smoke test

python -m walkindb

Provisions a fresh walk-in, runs SELECT 1, and prints the session token.

What walkindb is not

  • Not a durable database. Data is deleted after ~10 minutes.
  • Not for PII or regulated data. See the AUP.
  • Not a Postgres or MySQL replacement.

Apache 2.0. Server source at github.com/walkindb/walkindb. Landing page and full docs at walkindb.com.

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

walkindb-0.1.1.tar.gz (2.6 kB view details)

Uploaded Source

Built Distribution

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

walkindb-0.1.1-py3-none-any.whl (2.3 kB view details)

Uploaded Python 3

File details

Details for the file walkindb-0.1.1.tar.gz.

File metadata

  • Download URL: walkindb-0.1.1.tar.gz
  • Upload date:
  • Size: 2.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.2

File hashes

Hashes for walkindb-0.1.1.tar.gz
Algorithm Hash digest
SHA256 1e33d46cebdac0185b183c6679e59dd8b2d970b922e7ded6099340e9d6870f55
MD5 e275c6dba3402e9fef9bf1843a8455d9
BLAKE2b-256 fe297aeee9e88a394d4e580cacc2c70ef276b2a5acb0376f15a3485f5d40df62

See more details on using hashes here.

File details

Details for the file walkindb-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: walkindb-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 2.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.2

File hashes

Hashes for walkindb-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 44548ced8d15a2e922414cd375be327e939af5c5c3c7086097525cc879890663
MD5 3d8714081b55ae974eaf3737a28391fa
BLAKE2b-256 9679a820577c4235b5d0d9c21d81e5be23c788bd72cc5b2c8386acc7e1007f9b

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