diff --git a/README.md b/README.md
index d3de588..6d3e39d 100644
--- a/README.md
+++ b/README.md
@@ -2,6 +2,11 @@
[![Downloads](https://static.pepy.tech/personalized-badge/st-supabase-connection?period=total&units=international_system&left_color=black&right_color=brightgreen&left_text=Downloads)](https://pepy.tech/project/st-supabase-connection)
A Streamlit connection component to connect Streamlit to Supabase Storage and Database.
+
+## :student: Interactive tutorial
+[![Open in Streamlit](https://static.streamlit.io/badges/streamlit_badge_black_white.svg)](https://st-supabase-connection.streamlit.app/)
+
+
## :thinking: Why use this?
- [X] Cache functionality to cache returned results. **Save time and money** on your API requests
- [X] Same method names as the Supabase Python API. **Minimum relearning required**
@@ -15,7 +20,7 @@ A Streamlit connection component to connect Streamlit to Supabase Storage and Da
Without connector | With connector |
- Download file from Supabase storage |
+ Download file to local system from Supabase storage |
@@ -67,7 +72,7 @@ A Streamlit connection component to connect Streamlit to Supabase Storage and Da
|
- Upload file to Supabase storage |
+ Upload file from local system to Supabase storage |
@@ -112,18 +117,13 @@ A Streamlit connection component to connect Streamlit to Supabase Storage and Da
destination_path = st.text_input("Enter destination path")
if st.button("Upload"):
- st_supabase_client.upload(bucket_id, uploaded_file, destination_path)
+ st_supabase_client.upload(bucket_id, "local", uploaded_file, destination_path)
```
|
-## :computer: Learn how to use this in a demo app
-[![Open in Streamlit](https://static.streamlit.io/badges/streamlit_badge_black_white.svg)](https://st-supabase-connection.streamlit.app/)
-
-
-
## :construction: Setup
1. Install `st-supabase-connection`
@@ -153,6 +153,36 @@ pip install st-supabase-connection
```
3. Use in your app to query tables and files. Happy Streamlit-ing! :balloon:
+## :ok_hand: Supported methods
+
+ Storage
+
+ - delete_bucket()
+ - empty_bucket()
+ - get_bucket()
+ - list_buckets()
+ - create_bucket()
+ - upload()
+ - download()
+ - update_bucket()
+ - move()
+ - list_objects()
+ - create_signed_urls()
+ - get_public_url()
+ - create_signed_upload_url()
+ - upload_to_signed_url()
+
+
+
+
+
+ Database
+
+ - query() - Runs a cached SELECT query
+ - All methods supported by postgrest-py.
+
+
+
## :writing_hand: Examples
### :package: Storage operations
@@ -187,6 +217,12 @@ pip install st-supabase-connection
>>> st_supabase_client.create_bucket("new_bucket")
{'name': 'new_bucket'}
```
+
+#### Get bucket details
+```python
+>>> st_supabase.get_bucket("new_bucket")
+SyncBucket(id='new_bucket', name='new_bucket', owner='', public=True, created_at=datetime.datetime(2023, 8, 2, 19, 41, 44, 810000, tzinfo=tzutc()), updated_at=datetime.datetime(2023, 8, 2, 19, 41, 44, 810000, tzinfo=tzutc()), file_size_limit=None, allowed_mime_types=None)
+```
#### Update a bucket
```python
>>> st_supabase_client.update_bucket(
@@ -226,6 +262,12 @@ pip install st-supabase-connection
}
]
```
+
+#### Empty a bucket
+```python
+>>> st_supabase.empty_bucket("new_bucket")
+{'message': 'Successfully emptied'}
+```
#### Delete a bucket
```python
>>> st_supabase_client.delete_bucket("new_bucket")