-
Notifications
You must be signed in to change notification settings - Fork 505
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update markdown table CSS * 1.42.0/auth (#1221) * Add pages and redirects * Update streamlit.json * Update experimental_user for Community Cloud * Update RefCards * Update user RefCard * Update streamlit.json * Typo and style * Move st.context * Update streamlit.json * Update streamlit.json * Update streamlit.json * Update streamlit.json * Authentication concept page * What's new, release notes, cheat sheet * Ref cards * Bump embedded app versions * Dataframe column sort and pin * Move authentication to separate PR * Authentication guide (#1225) * Authentication guide * Review edits * Add link to authenticatino guide
- Loading branch information
1 parent
c98a2c4
commit f19fab9
Showing
45 changed files
with
11,417 additions
and
796 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -195,6 +195,29 @@ Display a horizontal rule. | |
st.divider() | ||
``` | ||
|
||
</RefCard> | ||
<RefCard href="/develop/api-reference/text/st.help"> | ||
|
||
<h4>Get help</h4> | ||
|
||
Display object’s doc string, nicely formatted. | ||
|
||
```python | ||
st.help(st.write) | ||
st.help(pd.DataFrame) | ||
``` | ||
|
||
</RefCard> | ||
<RefCard href="/develop/api-reference/text/st.html"> | ||
|
||
<h4>Render HTML</h4> | ||
|
||
Renders HTML strings to your app. | ||
|
||
```python | ||
st.html("<p>Foo bar.</p>") | ||
``` | ||
|
||
</RefCard> | ||
</TileContainer> | ||
|
||
|
@@ -1891,6 +1914,47 @@ rain(emoji="🎈", font_size=54, | |
|
||
## App logic and configuration | ||
|
||
### Authentication and user info | ||
|
||
<br /> | ||
|
||
<TileContainer> | ||
<RefCard href="/develop/api-reference/user/st.login"> | ||
|
||
<h4>Log in a user</h4> | ||
|
||
`st.login()` starts an authentication flow with an identity provider. | ||
|
||
```python | ||
st.login() | ||
``` | ||
|
||
</RefCard> | ||
<RefCard href="/develop/api-reference/user/st.logout"> | ||
|
||
<h4>Log out a user</h4> | ||
|
||
`st.logout()` removes a user's identity information. | ||
|
||
```python | ||
st.logout() | ||
``` | ||
|
||
</RefCard> | ||
<RefCard href="/develop/api-reference/user/st.user"> | ||
|
||
<h4>User info</h4> | ||
|
||
`st.experimental_user` returns information about a logged-in user. | ||
|
||
```python | ||
if st.experimental_user.is_logged_in: | ||
st.write(f"Welcome back, {st.experimental_user.name}!") | ||
``` | ||
|
||
</RefCard> | ||
</TileContainer> | ||
|
||
### Navigation and pages | ||
|
||
<br /> | ||
|
@@ -2152,6 +2216,18 @@ st.query_params[key] = value | |
st.query_params.clear() | ||
``` | ||
|
||
</RefCard> | ||
<RefCard href="/develop/api-reference/user/st.context"> | ||
|
||
<h4>Context</h4> | ||
|
||
`st.context` provides a read-only interface to access cookies and headers. | ||
|
||
```python | ||
st.context.cookies | ||
st.context.headers | ||
``` | ||
|
||
</RefCard> | ||
|
||
</TileContainer> | ||
|
@@ -2370,62 +2446,6 @@ iframe( | |
|
||
</TileContainer> | ||
|
||
### Utilities and user info | ||
|
||
<br /> | ||
|
||
<TileContainer> | ||
<RefCard href="/develop/api-reference/utilities/st.context"> | ||
|
||
<h4>Context</h4> | ||
|
||
`st.context` provides a read-only interface to access cookies and headers. | ||
|
||
```python | ||
st.context.cookies | ||
st.context.headers | ||
``` | ||
|
||
</RefCard> | ||
<RefCard href="/develop/api-reference/utilities/st.help"> | ||
|
||
<h4>Get help</h4> | ||
|
||
Display object’s doc string, nicely formatted. | ||
|
||
```python | ||
st.help(st.write) | ||
st.help(pd.DataFrame) | ||
``` | ||
|
||
</RefCard> | ||
<RefCard href="/develop/api-reference/utilities/st.html"> | ||
|
||
<h4>Render HTML</h4> | ||
|
||
Renders HTML strings to your app. | ||
|
||
```python | ||
st.html("<p>Foo bar.</p>") | ||
``` | ||
|
||
</RefCard> | ||
<RefCard href="/develop/api-reference/utilities/st.experimental_user" size="full"> | ||
|
||
<h4>User info</h4> | ||
|
||
`st.experimental_user` returns information about the logged-in user of private apps on Streamlit Community Cloud. | ||
|
||
```python | ||
if st.experimental_user.email == "[email protected]": | ||
st.write("Welcome back, ", st.experimental_user.email) | ||
else: | ||
st.write("You are not authorized to view this page.") | ||
``` | ||
|
||
</RefCard> | ||
</TileContainer> | ||
|
||
### Configuration | ||
|
||
<br /> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...evelop/api-reference/utilities/context.md → ...pi-reference/caching-and-state/context.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.