Skip to content

Commit

Permalink
v1.2.1: Bumped Streamlit to 1.28
Browse files Browse the repository at this point in the history
  • Loading branch information
SiddhantSadangi committed Nov 1, 2023
1 parent ff6def0 commit 64f8982
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ if st.button("Request download"):
import streamlit as st
from st_supabase_connection import SupabaseConnection

st_supabase_client = st.experimental_connection(
st_supabase_client = st.connection(
name="supabase_connection", type=SupabaseConnection
)

Expand Down Expand Up @@ -122,7 +122,7 @@ if st.button("Upload"):
import streamlit as st
from st_supabase_connection import SupabaseConnection

st_supabase_client = st.experimental_connection(
st_supabase_client = st.connection(
name="supabase_connection", type=SupabaseConnection
)

Expand Down Expand Up @@ -151,7 +151,7 @@ pip install st-supabase-connection
2. Set the `SUPABASE_URL` and `SUPABASE_KEY` Streamlit secrets as described [here](https://docs.streamlit.io/streamlit-community-cloud/get-started/deploy-an-app/connect-to-data-sources/secrets-management).

> [!NOTE]
> For local development outside Streamlit, you can also set these as your environment variables (recommended), or pass these to the `url` and `key` args of `st.experimental_connection()`.
> For local development outside Streamlit, you can also set these as your environment variables (recommended), or pass these to the `url` and `key` args of `st.connection()`.
## :magic_wand: Usage

Expand All @@ -161,7 +161,7 @@ pip install st-supabase-connection
```
2. Initialize
```python
st_supabase_client = st.experimental_connection(
st_supabase_client = st.connection(
name="YOUR_CONNECTION_NAME",
type=SupabaseConnection,
ttl=None,
Expand Down
8 changes: 4 additions & 4 deletions demo/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
use_container_width=True,
):
try:
st.session_state["client"] = st.experimental_connection(
st.session_state["client"] = st.connection(
name="supabase_connection", type=SupabaseConnection, ttl=ttl
)
st.session_state["initialized"] = True
Expand All @@ -105,7 +105,7 @@
st.write("A connection is initialized as")
st.code(
f"""
st_supabase = st.experimental_connection(
st_supabase = st.connection(
name="supabase_connection", type=SupabaseConnection, {ttl=}
)
""",
Expand All @@ -131,7 +131,7 @@
use_container_width=True,
):
try:
st.session_state["client"] = st.experimental_connection(
st.session_state["client"] = st.connection(
name="supabase_connection",
type=SupabaseConnection,
ttl=ttl,
Expand All @@ -151,7 +151,7 @@
st.write("A connection is initialized as")
st.code(
f"""
st_supabase = st.experimental_connection(
st_supabase = st.connection(
name="supabase_connection",
type=SupabaseConnection,
{ttl=},
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,5 @@ def get_version(rel_path):
],
keywords=["streamlit", "supabase", "connection", "integration"],
python_requires=">=3.8",
install_requires=["streamlit", "supabase"],
install_requires=["streamlit>=1.28", "supabase"],
)
6 changes: 3 additions & 3 deletions src/st_supabase_connection/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@

from postgrest import SyncSelectRequestBuilder, types
from streamlit import cache_data, cache_resource
from streamlit.connections import ExperimentalBaseConnection
from streamlit.connections import BaseConnection
from supabase import Client, create_client

__version__ = "1.2.0"
__version__ = "1.2.1"


class SupabaseConnection(ExperimentalBaseConnection[Client]):
class SupabaseConnection(BaseConnection[Client]):
"""
Connects a streamlit app to Supabase Storage and Database
Expand Down

0 comments on commit 64f8982

Please sign in to comment.