File tree 2 files changed +16
-8
lines changed
2 files changed +16
-8
lines changed Original file line number Diff line number Diff line change 1
1
from typing import Any , Dict
2
2
3
3
from postgrest import SyncFilterRequestBuilder , SyncPostgrestClient , SyncRequestBuilder
4
- from storage3 import SyncStorageClient
5
- from storage3 import create_client as create_storage_client
6
4
7
- from supabase .lib .auth_client import SupabaseAuthClient
8
- from supabase .lib .client_options import ClientOptions
5
+ from .lib .auth_client import SupabaseAuthClient
6
+ from .lib .client_options import ClientOptions
7
+ from .lib .storage_client import SupabaseStorageClient
9
8
10
9
11
10
class Client :
@@ -61,11 +60,9 @@ def __init__(
61
60
headers = options .headers ,
62
61
)
63
62
64
- def storage (self ) -> SyncStorageClient :
63
+ def storage (self ) -> SupabaseStorageClient :
65
64
"""Create instance of the storage client"""
66
- return create_storage_client (
67
- self .storage_url , self ._get_auth_headers (), is_async = False
68
- )
65
+ return SupabaseStorageClient (self .storage_url , self ._get_auth_headers ())
69
66
70
67
def table (self , table_name : str ) -> SyncRequestBuilder :
71
68
"""Perform a table operation.
Original file line number Diff line number Diff line change
1
+ from deprecation import deprecated
2
+ from storage3 import SyncStorageClient
3
+ from storage3 ._sync .file_api import SyncBucketProxy
4
+
5
+
6
+ class SupabaseStorageClient (SyncStorageClient ):
7
+ """Manage storage buckets and files."""
8
+
9
+ @deprecated ("0.5.4" , "0.6.0" , details = "Use `.from_()` instead" )
10
+ def StorageFileAPI (self , id_ : str ) -> SyncBucketProxy :
11
+ return super ().from_ (id_ )
You can’t perform that action at this time.
0 commit comments