Functions-py
Installation
The package can be installed using pip, uv or poetry:
Pip
pip install supabase_functions
UV
uv add supabase_functions
Poetry
poetry add supabase_functions
Usage
Deploy your Edge Function following the Supabase Functions documentation.
Asynchronous Client
import asyncio
from supabase_functions import AsyncFunctionsClient
async def run_func():
# Initialize the client with your project URL and optional headers
headers = {
"Authorization": "Bearer your-publishable-key",
# Add any other headers you might need
}
fc = AsyncFunctionsClient("https://<project_ref>.functions.supabase.co", headers)
try:
# Invoke your Edge Function
res = await fc.invoke("payment-sheet", {
"responseType": "json",
"body": {"amount": 1000, "currency": "usd"}
})
print("Response:", res)
except Exception as e:
print(f"Error: {e}")
if __name__ == "__main__":
asyncio.run(run_func())
Synchronous Client
from supabase_functions import SyncFunctionsClient
# Initialize the client
headers = {"Authorization": "Bearer your-publishable-key"}
fc = SyncFunctionsClient("https://<project_ref>.functions.supabase.co", headers)
# Invoke your Edge Function
try:
res = fc.invoke("payment-sheet", {
"responseType": "json",
"body": {"amount": 1000, "currency": "usd"}
})
print("Response:", res)
except Exception as e:
print(f"Error: {e}")
Metadata
Release files for supabase-functions 2.32.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| supabase_functions-2.32.0.tar.gz | 5.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| supabase_functions-2.32.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 14.2 kB
Release files / supabase_functions-2.32.0.tar.gz
| Download URL | supabase_functions-2.32.0.tar.gz |
|---|---|
| Size | 5.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
78eb2f408894d25550d91736500dc0f6896ba3fc07ca63cd31c1173447dceaa0
|
|
BLAKE2b-256 checksum How to use checksums |
749139da94fc6412a3e012ff6b4a3ae7ab008409869638b6b4a2b6d64beb6811
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.8.2
|
Release files / supabase_functions-2.32.0-py3-none-any.whl
| Download URL | supabase_functions-2.32.0-py3-none-any.whl |
|---|---|
| Size | 9.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d3ca04e3128f90d84a96a150bfd4e7407a9dec84a342f548cb538ee1e6300d88
|
|
BLAKE2b-256 checksum How to use checksums |
64cf3d9f6ceb52c6913040f90674579fe64d4fda2c0ae5aa32a1cc7faa30fb31
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.8.2
|