Skip to main content

stitchdb

The official Python client for StitchDB: Postgres database, auth, storage, realtime and Edge Functions. Sync and async.

pip install stitchdb

Python 3.9+. To install the latest code from this repository instead: pip install "git+https://github.com/stitchdb/stitchdb-python".

import os
from stitchdb import create_client

stitchdb = create_client(os.environ["STITCHDB_URL"], os.environ["STITCHDB_KEY"])

# Database (respects Row Level Security)
rows = stitchdb.table("todos").select("id, task").eq("is_complete", False).limit(10).execute().data
stitchdb.table("todos").insert({"task": "Ship it"}).execute()
stitchdb.rpc("search_todos", {"term": "ship"}).execute()

# Auth
stitchdb.auth.sign_in_with_password({"email": "ada@example.com", "password": "..."})
user = stitchdb.auth.get_user()

# Storage
stitchdb.storage.from_("avatars").upload("user-1/avatar.png", open("avatar.png", "rb").read())
url = stitchdb.storage.from_("avatars").create_signed_url("user-1/avatar.png", 60)

# Edge Functions
stitchdb.functions.invoke("hello-world", {"body": {"name": "Ada"}})

Async: from stitchdb import acreate_client and stitchdb = await acreate_client(url, key). Realtime needs the async client.

Find your project URL and keys in the dashboard under Settings → API keys. Use the service_role key only on servers you control.

Documentation: https://stitchdb.com/docs/sdk/python

Metadata

Release files for stitchdb 2.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for stitchdb 2.0.0
File Size Uploaded Provenance Actions
stitchdb-2.0.0.tar.gz 90.8 kB Without provenance Details for stitchdb-2.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for stitchdb 2.0.0
File Interpreter ABI Platform Actions
stitchdb-2.0.0-py3-none-any.whl Python 3 none any Details for stitchdb-2.0.0-py3-none-any.whl

Total release size: 227.7 kB

Release files / stitchdb-2.0.0.tar.gz

Download URL stitchdb-2.0.0.tar.gz
Size 90.8 kB
Tags Source
SHA-256 checksum
How to use checksums
7a35c81fe5ae7fc06665b1ed163038a8207f801ddb4088b7549ff9c69729dbaf
BLAKE2b-256 checksum
How to use checksums
b973f59672afc6a24fb76c5000c270b186fac6561d4eaa5ba7f0681bf479c0b6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.15

Release files / stitchdb-2.0.0-py3-none-any.whl

Download URL stitchdb-2.0.0-py3-none-any.whl
Size 136.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d2780241aae2a200b7447cc27d646b55c61cff02f6a9077140da9761f6b507fb
BLAKE2b-256 checksum
How to use checksums
0f1acf581afda576888fbba00e4941a3ff2e56dad599eeb4c3ff2a4e784f0849
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.15

Security for stitchdb 2.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page