Skip to content

Commit fa1e793

Browse files
author
Joel Lee
committed
chore: supabase_py -> supabase
1 parent b20703d commit fa1e793

22 files changed

+34
-34
lines changed

README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ We can then read the keys in the python source code.
5050

5151
```python
5252
import os
53-
from supabase_py import create_client, Client
53+
from supabase import create_client, Client
5454

5555
url: str = os.environ.get("SUPABASE_URL")
5656
key: str = os.environ.get("SUPABASE_KEY")
@@ -88,7 +88,7 @@ This is a sample of how you'd use supabase-py. Functions and tests are WIP
8888
## Authenticate
8989

9090
```python
91-
from supabase_py import create_client, Client
91+
from supabase import create_client, Client
9292

9393
url: str = os.environ.get("SUPABASE_TEST_URL")
9494
key: str = os.environ.get("SUPABASE_TEST_KEY")
@@ -102,7 +102,7 @@ user = supabase.auth.sign_up(email=random_email, password=random_password)
102102
## Sign-in
103103

104104
```python
105-
from supabase_py import create_client, Client
105+
from supabase import create_client, Client
106106

107107
url: str = os.environ.get("SUPABASE_TEST_URL")
108108
key: str = os.environ.get("SUPABASE_TEST_KEY")
@@ -118,7 +118,7 @@ user = supabase.auth.sign_in(email=random_email, password=random_password)
118118
#### Insertion of Data
119119

120120
```python
121-
from supabase_py import create_client, Client
121+
from supabase import create_client, Client
122122

123123
url: str = os.environ.get("SUPABASE_TEST_URL")
124124
key: str = os.environ.get("SUPABASE_TEST_KEY")
@@ -130,7 +130,7 @@ assert len(data.get("data", [])) > 0
130130
#### Selection of Data
131131

132132
```python
133-
from supabase_py import create_client, Client
133+
from supabase import create_client, Client
134134

135135
url: str = os.environ.get("SUPABASE_TEST_URL")
136136
key: str = os.environ.get("SUPABASE_TEST_KEY")

docs/index.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
Welcome to supabase's documentation!
77
====================================
88

9-
.. automodule:: supabase_py
9+
.. automodule:: supabase
1010
:members:
1111
:show-inheritance:
1212

docs/query_builder.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Query Builder
22
================
33

4-
.. automodule:: supabase_py.lib.query_builder
4+
.. automodule:: supabase.lib.query_builder
55
:members:
66
:show-inheritance:

docs/storage_bucket.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Storage Bucket
22
================
33

4-
.. automodule:: supabase_py.lib.storage.storage_bucket_api
4+
.. automodule:: supabase.lib.storage.storage_bucket_api
55
:members:
66
:show-inheritance:

pyproject.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
2-
name = "supabase-py"
3-
version = "0.0.2"
2+
name = "supabase"
3+
version = "0.0.3"
44
description = "Supabase client for Python."
55
authors = ["Joel Lee <[email protected]>", "Leon Fedden <[email protected]>"]
66
license = "MIT"

supabase/__init__.py

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
__version__ = "0.0.2"
2+
3+
from supabase import client, lib
4+
from supabase.client import Client, create_client
5+
6+
__all__ = ["client", "lib", "Client", "create_client"]

supabase_py/client.py renamed to supabase/client.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
from postgrest_py import PostgrestClient
44

5-
from supabase_py.lib.auth_client import SupabaseAuthClient
6-
from supabase_py.lib.constants import DEFAULT_HEADERS
7-
from supabase_py.lib.query_builder import SupabaseQueryBuilder
8-
from supabase_py.lib.realtime_client import SupabaseRealtimeClient
9-
from supabase_py.lib.storage_client import SupabaseStorageClient
5+
from supabase.lib.auth_client import SupabaseAuthClient
6+
from supabase.lib.constants import DEFAULT_HEADERS
7+
from supabase.lib.query_builder import SupabaseQueryBuilder
8+
from supabase.lib.realtime_client import SupabaseRealtimeClient
9+
from supabase.lib.storage_client import SupabaseStorageClient
1010

1111
DEFAULT_OPTIONS = {
1212
"schema": "public",
@@ -213,7 +213,7 @@ def create_client(supabase_url: str, supabase_key: str, **options) -> Client:
213213
--------
214214
Instanciating the client.
215215
>>> import os
216-
>>> from supabase_py import create_client, Client
216+
>>> from supabase import create_client, Client
217217
>>>
218218
>>> url: str = os.environ.get("SUPABASE_TEST_URL")
219219
>>> key: str = os.environ.get("SUPABASE_TEST_KEY")

supabase/lib/__init__.py

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
from supabase.lib import auth_client, query_builder, realtime_client
2+
3+
__all__ = ["auth_client", "query_builder", "realtime_client"]
File renamed without changes.
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
from supabase_py import __version__
1+
from supabase import __version__
22

33
DEFAULT_HEADERS = {"X-Client-Info": f"supabase-py/{__version__}"}
File renamed without changes.
File renamed without changes.

supabase_py/lib/storage_client.py renamed to supabase/lib/storage_client.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
from supabase_py.lib.storage.storage_bucket_api import StorageBucketAPI
2-
from supabase_py.lib.storage.storage_file_api import StorageFileAPI
1+
from supabase.lib.storage.storage_bucket_api import StorageBucketAPI
2+
from supabase.lib.storage.storage_file_api import StorageFileAPI
33

44

55
class SupabaseStorageClient(StorageBucketAPI):
File renamed without changes.

supabase_py/__init__.py

-6
This file was deleted.

supabase_py/lib/__init__.py

-3
This file was deleted.

tests/conftest.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
import pytest
66

7-
from supabase_py import Client, create_client
7+
from supabase import Client, create_client
88

99

1010
@pytest.fixture(scope="session")

tests/test_client.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import pytest
88

99
if TYPE_CHECKING:
10-
from supabase_py import Client
10+
from supabase import Client
1111

1212

1313
def _random_string(length: int = 10) -> str:
@@ -33,7 +33,7 @@ def _assert_authenticated_user(data: Dict[str, Any]) -> None:
3333
@pytest.mark.parametrize("key", ["", None, "valeefgpoqwjgpj", 139, -1, {}, []])
3434
def test_incorrect_values_dont_instanciate_client(url: Any, key: Any) -> None:
3535
"""Ensure we can't instanciate client with nonesense values."""
36-
from supabase_py import Client, create_client
36+
from supabase import Client, create_client
3737

3838
_: Client = create_client(url, key)
3939

tests/test_dummy.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import supabase_py
1+
import supabase
22

33
"""
44
Convert this flow into a test
5-
client = supabase_py.Client("<insert link>", "<password>")
5+
client = supabase.Client("<insert link>", "<password>")
66
client.auth.sign_up({"email": "[email protected]", "password": "apassword"})
77
"""
88

@@ -13,4 +13,4 @@ def test_dummy() -> None:
1313

1414

1515
def test_client_initialziation() -> None:
16-
client = supabase_py.Client("http://testwebsite.com", "atestapi")
16+
client = supabase.Client("http://testwebsite.com", "atestapi")

0 commit comments

Comments
 (0)