Skip to main content

Library for Supabase Functions

Project description

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-anon-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-anon-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}")

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

supabase_functions-3.0.0a1.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

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

supabase_functions-3.0.0a1-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file supabase_functions-3.0.0a1.tar.gz.

File metadata

  • Download URL: supabase_functions-3.0.0a1.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.12 {"installer":{"name":"uv","version":"0.10.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"NixOS","version":"26.05","id":"yarara","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for supabase_functions-3.0.0a1.tar.gz
Algorithm Hash digest
SHA256 b79bfffd86f4662ce6a904952f6fcf4c2befe07626a61374f2d5c8c6b20244a0
MD5 346d5e9cae084e97d2b7dcda8cac3a2b
BLAKE2b-256 a2ab06de322754a663e6b41bea3b09d71d80b560a040867201215added3becaf

See more details on using hashes here.

File details

Details for the file supabase_functions-3.0.0a1-py3-none-any.whl.

File metadata

  • Download URL: supabase_functions-3.0.0a1-py3-none-any.whl
  • Upload date:
  • Size: 5.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.12 {"installer":{"name":"uv","version":"0.10.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"NixOS","version":"26.05","id":"yarara","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for supabase_functions-3.0.0a1-py3-none-any.whl
Algorithm Hash digest
SHA256 2607ba734d99ca5613e1b9a61917db39dd3e45acfffd3ed3e8ce9a2687b9a117
MD5 6c6a9c824d8e13cc5b77f441c62fe938
BLAKE2b-256 07ef4eb3323741e0df7daa4ca6982624be7b9a46a3e01c66f820c2d86d2081ba

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