Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix example and rename to streamlit #65

Merged
merged 1 commit into from
Mar 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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))
Loading