Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 33 additions & 2 deletions supabase/__init__.py
Original file line number Diff line number Diff line change
@@ -1,35 +1,66 @@
from gotrue.errors import (
AuthApiError,
AuthError,
AuthImplicitGrantRedirectError,
AuthInvalidCredentialsError,
AuthRetryableError,
AuthSessionMissingError,
AuthUnknownError,
AuthWeakPasswordError,
)
from postgrest import APIError as PostgrestAPIError
from postgrest import APIResponse as PostgrestAPIResponse
from realtime import AuthorizationError, NotConnectedError
from storage3.utils import StorageException
from supafunc.errors import FunctionsError, FunctionsHttpError, FunctionsRelayError
Copy link
Contributor

@J0 J0 Sep 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not urgent and definitely not in scope for this PR: I think there was an ask for a move from supafunc to supabase_functions can do that in the future

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes this has to wait until 3.0 of the library as it's a breaking change also this current addition is to help with migrating to that as user's will now import the errors from the supabase library rather than supafunc as some are probably doing now.


# Async Client
from ._async.auth_client import AsyncSupabaseAuthClient as ASupabaseAuthClient
from ._async.client import AsyncClient as AClient
from ._async.client import AsyncStorageClient as ASupabaseStorageClient
from ._async.client import ClientOptions as AClientOptions
from ._async.client import create_client as acreate_client
from ._async.client import create_client as create_async_client

# Sync Client
from ._sync.auth_client import SyncSupabaseAuthClient as SupabaseAuthClient
from ._sync.client import ClientOptions
from ._sync.client import SyncClient as Client
from ._sync.client import SyncStorageClient as SupabaseStorageClient
from ._sync.client import create_client

# Lib
from .lib.client_options import ClientOptions

# Version
from .version import __version__

__all__ = [
"acreate_client",
"create_async_client",
"AClient",
"ASupabaseAuthClient",
"ASupabaseStorageClient",
"AClientOptions",
"create_client",
"Client",
"SupabaseAuthClient",
"SupabaseStorageClient",
"ClientOptions",
"PostgrestAPIError",
"PostgrestAPIResponse",
"StorageException",
"version",
"__version__",
"AuthApiError",
"AuthError",
"AuthImplicitGrantRedirectError",
"AuthInvalidCredentialsError",
"AuthRetryableError",
"AuthSessionMissingError",
"AuthWeakPasswordError",
"AuthUnknownError",
"FunctionsHttpError",
"FunctionsRelayError",
"FunctionsError",
"AuthorizationError",
"NotConnectedError",
]
Loading