Registry / aws / supafunc

supafunc

JSON →
library0.10.2pypypi✓ verified 22d ago

supafunc is a Python client library for interacting with Supabase Edge Functions. It provides synchronous and asynchronous APIs to invoke serverless functions deployed on Supabase. As of August 8, 2025, this package is officially deprecated in favor of `supabase_functions` to align with the JavaScript client library naming convention. Version 0.10.2 is the last version that received updates under this name and includes deprecation warnings upon import.

pip install supafunc
INSTALL
IMPORT
SIG · SUPAFUNC
S
supafunc
awspythonv0.10.2
Install
2.8s avg
Import
224ms
Disk
48MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.10.2 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.910 runs
installs and imports cleanly · install 0.0s · import 0.226s · 75.4MB
glibc
py 3.103.910 runs
installs and imports cleanly · install 2.8s · import 0.222s · 24MB
48MB installed
● package 48MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

AsyncFunctionsClient
from supafunc import AsyncFunctionsClient
from supabase_functions import AsyncFunctionsClient
SyncFunctionsClient
from supafunc import SyncFunctionsClient
create_client
from supafunc import create_client

This example demonstrates how to invoke a Supabase Edge Function using the recommended `supabase-py` client, which includes the `supabase_functions` client for invoking functions. It assumes an Edge Function named 'hello-world' is deployed on your Supabase project. Replace placeholder environment variables with your actual Supabase project URL and Anon Key.

import os from supabase import create_client # Note: This quickstart uses the recommended 'supabase_functions' client # Ensure your Supabase project URL and Anon Key are set as environment variables SUPABASE_URL = os.environ.get('SUPABASE_URL', 'YOUR_SUPABASE_URL') SUPABASE_ANON_KEY = os.environ.get('SUPABASE_ANON_KEY', 'YOUR_SUPABASE_ANON_KEY') # Initialize the Supabase client, which includes the functions client supabase = create_client(SUPABASE_URL, SUPABASE_ANON_KEY) functions_client = supabase.functions async def invoke_hello_world(): try: # Assuming you have an Edge Function named 'hello-world' deployed # that expects a JSON body like {'name': 'World'} response = await functions_client.invoke( 'hello-world', invoke_options={'body': {'name': 'Supabase User'}} ) print(f"Function invoked successfully: {response.data}") except Exception as e: print(f"Error invoking function: {e}") if __name__ == '__main__': import asyncio asyncio.run(invoke_hello_world())
Debug
Known issues
breakingThe `supafunc` package is officially deprecated as of August 8, 2025, in favor of `supabase_functions`. Version `0.10.2` is the last to receive updates and will issue deprecation warnings upon import. Future development and bug fixes will only be applied to `supabase_functions`.
fix
Migrate all package references (e.g., in `pyproject.toml`, `requirements.txt`) from `supafunc` to `supabase_functions` and update all import statements (e.g., `from supafunc import ...` to `from supabase_functions import ...`).
affects: >=0.10.2 (for deprecation warnings), all versions (for future support)
breakingThe minimum required Python version was bumped to 3.9 in `v0.6.2`. Users on older Python versions will encounter compatibility issues.
fix
Upgrade your Python environment to version 3.9 or higher.
affects: <0.6.2
breakingIn `v0.9.0`, region enumerated literals were rewritten as Python Enums. If your code relied on specific string values or direct comparisons with previous literal representations, this could be a breaking change.
fix
Update your code to use the new `Region` Enum members (e.g., `Region.US_EAST_1`) instead of string literals, if applicable.
affects: >=0.9.0
gotchaPrior to `v0.10.1`, strict JWT key validation might have caused issues with newer Supabase API keys. This was resolved by relaxing the validation.
fix
Upgrade to `v0.10.1` or `supabase_functions` to ensure compatibility with all API key types. If using an older version, ensure your API key is compatible with the stricter validation.
affects: <0.10.1
gotchaVersions prior to `v0.9.3` improperly handled non-JSON body types when invoking functions, potentially leading to incorrect data transmission or errors.
fix
Upgrade to `v0.9.3` or `supabase_functions` if you are sending non-JSON payloads to your Edge Functions.
affects: <0.9.3
Upgrade
Version history
0.10.2latest on PyPI · released Aug 8, 2025
Audit
Dependencies
httpxoptionalUsed for underlying HTTP requests, especially when injecting custom clients.
Agent activity
37 hits · last 30 days
node
32
OpenAI (training)
1
Resources
supafunc — pip install supafunc · libregistry