vitibase
Python client for Vitibase — Postgres hosted in India, with an instant REST API, authentication, file storage and realtime.
pip install vitibase
import os
from vitibase import create_client, Client
vitibase: Client = create_client(
os.environ.get("VITIBASE_PROJECT_REF"),
os.environ.get("VITIBASE_KEY"),
)
response = vitibase.table("orders").select("id, total").eq("status", "paid").execute()
A project ref, or a URL
create_client takes either. A ref is the twenty-letter identifier on your project's Connect
panel, and the URL is built for you:
create_client("abcdefghijklmnopqrst", key) # https://abcdefghijklmnopqrst.vitibase.in
create_client("https://db.example.com", key) # used exactly as given
project_url(ref) is exported separately, for the places that need the address rather than a
client.
Async
from vitibase import acreate_client
client = await acreate_client(project_ref, key)
What this package is
A thin layer over supabase, which it re-exports in
full. Vitibase serves the same data-plane API, so a second client would mean maintaining a
worse one and owning every bug in it.
Migrating an existing application is one import line:
-from supabase import create_client, Client
-client = create_client(SUPABASE_URL, SUPABASE_KEY)
+from vitibase import create_client, Client
+client = create_client(VITIBASE_PROJECT_REF, VITIBASE_KEY)
Every exception and helper type is the upstream object, so except PostgrestAPIError keeps
working. VitibaseException and SupabaseException are the same class under two names.
Licence and attribution
Apache-2.0. Depends on supabase, which is MIT licensed and copyright Supabase, Inc. Postgres
is a registered trademark of the PostgreSQL Community Association of Canada. Supabase is a
trademark of Supabase, Inc., which does not endorse Vitibase.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file vitibase-0.1.0.tar.gz.
File metadata
- Download URL: vitibase-0.1.0.tar.gz
- Upload date:
- Size: 4.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
31120a172756b9aa473ed239f93b95bf6dda61b2ef12258d26b6be008de20882
|
|
| MD5 |
d829838ae1963ac0c54dac6e808596ec
|
|
| BLAKE2b-256 |
e2e73c11b43633a38d475934bc8beee2b8d5fbb7ec31f5830d951c66daeba6e5
|
File details
Details for the file vitibase-0.1.0-py3-none-any.whl.
File metadata
- Download URL: vitibase-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bcc3d29caaae8c74bbe67185807986caa3d61d9a2f387d5158fd9f1d01634dab
|
|
| MD5 |
529754489f6cac4e94af28dc8c4a8bd8
|
|
| BLAKE2b-256 |
457a851429be9d90f663b99bf76ad1bc394fbd16428aa26611bcad52f105f114
|