Skip to content

Commit

Permalink
Fix example and rename to streamlit
Browse files Browse the repository at this point in the history
  • Loading branch information
dbkegley committed Mar 1, 2024
1 parent e2a86c5 commit 7700320
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ openpyxl==3.1.2
packaging==23.2
pandas==2.1.4
pillow==10.2.0
posit-sdk @ git+https://github.com/posit-dev/posit-sdk-py.git@24ad71458de56b01b8168e80441ea860236f1933
posit-sdk @ git+https://github.com/posit-dev/posit-sdk-py.git@cec7f78a1bdee9e5fd7580011bfa0bcef58cd64b
protobuf==4.25.3
pyarrow==14.0.2
pyasn1==0.5.1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
# Read the viewer's user session token from the streamlit ws header.
headers = _get_websocket_headers()
if headers:
USER_SESSION_TOKEN = headers.get("Posit-Connect-User-Session")
USER_SESSION_TOKEN = headers.get('Posit-Connect-User-Session-Token')

credentials_provider = viewer_credentials_provider(
user_session_token=USER_SESSION_TOKEN
Expand All @@ -42,6 +42,6 @@
credentials_provider=credentials_provider,
) as connection:
with connection.cursor() as cursor:
cursor.execute("SELECT * FROM data")
cursor.execute("SELECT * FROM samples.nyctaxi.trips")
result = cursor.fetchall()
st.table(pd.DataFrame(result))

0 comments on commit 7700320

Please sign in to comment.