streamlit-auth
Streamlit module for creating oauth protected Stramlit apps.
Packaging
为了将此模块打包并上传到PyPI,请遵循以下步骤:
python3 -m pip install build
python3 -m build
python3 -m pip install --user --upgrade twine
python3 -m twine upload --repository pypi dist/*
Local Installation
要在本地安装此模块,可以使用以下命令:
pip install dist/*.tar.gz
streamlit-auth
A python package for creating oauth protected Stramlit apps!
Documentation
Once you configure the authentication and subscription on st.secrets, you can use the the library methods to conditionally render the content of the page:
import streamlit as st
from streamlit_auth import add_auth
add_auth()
st.write("Congrats, you are logged in!")
st.write('the email of the user is ' + str(st.session_state.login_user["email"]))
This package expects that you have a .streamlit/secrets.toml file which you will have to create. Inside it, you will need to add your Keycloak or Google API information that runs the authentication. Below is how the package expects your secrets file to look.
[oauth]
provider = "keycloak"
[oauth.google]
client_id = "....apps.googleusercontent.com"
client_secret = "GOCSPX-..."
redirect_url_test = 'http://localhost:8501/'
redirect_url = "http://localhost:8501/"
[oauth.keycloak]
url = 'https://keycloak.your-domain.com/auth'
realm = 'myrealm'
client_id = 'myclient'
logout_url = "https://keycloak.your-domain.com/auth/realms/myrealm/protocol/openid-connect/logout"
Metadata
Release files for streamlit-auth 0.1.7.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| streamlit-auth-0.1.7.1.tar.gz | 5.4 kB | Without provenance | Details for streamlit-auth-0.1.7.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| streamlit_auth-0.1.7.1-py3-none-any.whl | Python 3 | none | any | Details for streamlit_auth-0.1.7.1-py3-none-any.whl |
Total release size: 12.1 kB
Release files / streamlit-auth-0.1.7.1.tar.gz
| Download URL | streamlit-auth-0.1.7.1.tar.gz |
|---|---|
| Size | 5.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b5d7885a8fec105f53723301f43cbaedac9ea0ab0e41ae404b79f2f255473c55
|
|
BLAKE2b-256 checksum How to use checksums |
792f3bb20de7a1ac71dada984a86bf9fe056e27291151a5b6770ee6b0a895ab3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.5
|
Release files / streamlit_auth-0.1.7.1-py3-none-any.whl
| Download URL | streamlit_auth-0.1.7.1-py3-none-any.whl |
|---|---|
| Size | 6.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1693627e86c871ba82a5dddc21570d31840c0049e6540ed3d930183d5492b25b
|
|
BLAKE2b-256 checksum How to use checksums |
6e5c4a1da18fcaef0d055ecd28e2bab6eeb0a4faf425a8ee1bbbffe479658c82
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.5
|
Security for streamlit-auth 0.1.7.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.