supabase-functions-3.0.0a1
توضیحات
Library for Supabase Functions
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | supabase-functions-3.0.0a1 |
| نام | supabase-functions |
| نسخه کتابخانه | 3.0.0a1 |
| نگهدارنده | ['Leonardo Santiago'] |
| ایمیل نگهدارنده | ['Leonardo Santiago <leonardo.santiago@supabase.io>'] |
| نویسنده | Joel Lee, Andrew Smith |
| ایمیل نویسنده | Joel Lee <joel@joellee.org>, Andrew Smith <a.smith@silentworks.co.uk> |
| آدرس صفحه اصلی | - |
| آدرس اینترنتی | https://pypi.org/project/supabase-functions/ |
| مجوز | - |
# Functions-py
## Installation
The package can be installed using pip, uv or poetry:
### Pip
```bash
pip install supabase_functions
```
### UV
```bash
uv add supabase_functions
```
### Poetry
```bash
poetry add supabase_functions
```
## Usage
Deploy your Edge Function following the [Supabase Functions documentation](https://supabase.com/docs/guides/functions).
### Asynchronous Client
```python
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
```python
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}")
```
نیازمندی
| مقدار | نام |
|---|---|
| - | httpx[http2]<0.29,>=0.26 |
| - | strenum>=0.4.15 |
| - | yarl>=1.20.1 |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.9 | Python |
نحوه نصب
نصب پکیج whl supabase-functions-3.0.0a1:
pip install supabase-functions-3.0.0a1.whl
نصب پکیج tar.gz supabase-functions-3.0.0a1:
pip install supabase-functions-3.0.0a1.tar.gz