You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can also install locally after cloning this repo. Install Development mode with ``pip install -e``, which makes it so when you edit the source code the changes will be reflected in your python module.
46
29
47
-
## Usage
48
-
49
-
It's usually best practice to set your api key environment variables in some way that version control doesn't track them, e.g don't put them in your python modules! Set the key and url for the supabase instance in the shell, or better yet, use a dotenv file. Heres how to set the variables in the shell.
We can then read the keys in the python source code.
57
-
58
-
```python
59
-
import os
60
-
from supabase import create_client, Client
61
-
62
-
url: str= os.environ.get("SUPABASE_URL")
63
-
key: str= os.environ.get("SUPABASE_KEY")
64
-
supabase: Client = create_client(url, key)
65
-
```
66
-
67
-
Use the supabase client to interface with your database.
68
-
69
-
### Running Tests
70
-
71
-
Currently the test suites are in a state of flux. We are expanding our clients tests to ensure things are working, and for now can connect to this test instance, that is populated with the following table:
The above test database is a blank supabase instance that has populated the `countries` table with the built in countries script that can be found in the supabase UI. You can launch the test scripts and point to the above test database by running
data = supabase.storage.from_(bucket_name).move(old_file_path, new_file_path)
299
261
```
300
262
263
+
### Realtime Changes
301
264
302
-
## Realtime Changes
265
+
Realtime changes are still a WIP. Feel free to file PRs to [realtime-py](https://github.com/supabase-community/realtime-py).
303
266
304
-
Realtime changes are unfortunately still a WIP. Feel free to file PRs to [realtime-py](https://github.com/supabase-community/realtime-py)
267
+
## Contributing
305
268
306
-
See [Supabase Docs](https://supabase.com/docs/guides/client-libraries) for full list of examples
269
+
Contributing to the Python libraries are a great way to get involved with the Supabase community. Reach out to us on Discord if you want to get involved.
307
270
308
-
##Python and Supabase Resources
271
+
### Running Tests
309
272
310
-
-[Python data loading with Supabase](https://supabase.com/blog/loading-data-supabase-python)
311
-
-[Visualizing Supabase Data using Metabase](https://supabase.com/blog/visualizing-supabase-data-using-metabase)
273
+
Currently the test suites are in a state of flux. We are expanding our clients tests to ensure things are working, and for now can connect to this test instance, that is populated with the following table:
The above test database is a blank supabase instance that has populated the `countries` table with the built in countries script that can be found in the supabase UI. You can launch the test scripts and point to the above test database by running
0 commit comments