sweatstack 0.26.0__py3-none-any.whl → 0.27.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- sweatstack/streamlit.py +34 -28
- {sweatstack-0.26.0.dist-info → sweatstack-0.27.0.dist-info}/METADATA +1 -1
- {sweatstack-0.26.0.dist-info → sweatstack-0.27.0.dist-info}/RECORD +5 -5
- {sweatstack-0.26.0.dist-info → sweatstack-0.27.0.dist-info}/WHEEL +0 -0
- {sweatstack-0.26.0.dist-info → sweatstack-0.27.0.dist-info}/entry_points.txt +0 -0
sweatstack/streamlit.py
CHANGED
|
@@ -39,36 +39,42 @@ class StreamlitAuth:
|
|
|
39
39
|
st.session_state.pop("sweatstack_api_key")
|
|
40
40
|
st.rerun()
|
|
41
41
|
|
|
42
|
+
def _running_on_streamlit_cloud(self):
|
|
43
|
+
return os.environ.get("HOSTNAME") == "streamlit"
|
|
44
|
+
|
|
42
45
|
def _show_sweatstack_login(self):
|
|
43
46
|
authorization_url = self._get_authorization_url()
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
47
|
+
if not self._running_on_streamlit_cloud():
|
|
48
|
+
st.markdown(
|
|
49
|
+
f"""
|
|
50
|
+
<style>
|
|
51
|
+
.animated-button {{
|
|
52
|
+
}}
|
|
53
|
+
.animated-button:hover {{
|
|
54
|
+
transform: scale(1.05);
|
|
55
|
+
}}
|
|
56
|
+
.animated-button:active {{
|
|
57
|
+
transform: scale(1);
|
|
58
|
+
}}
|
|
59
|
+
</style>
|
|
60
|
+
<a href="{authorization_url}"
|
|
61
|
+
target="_top"
|
|
62
|
+
class="animated-button"
|
|
63
|
+
style="display: inline-block;
|
|
64
|
+
padding: 10px 20px;
|
|
65
|
+
background-color: #EF2B2D;
|
|
66
|
+
color: white;
|
|
67
|
+
text-decoration: none;
|
|
68
|
+
border-radius: 6px;
|
|
69
|
+
border: none;
|
|
70
|
+
transition: all 0.3s ease;
|
|
71
|
+
cursor: pointer;"
|
|
72
|
+
>Login with SweatStack</a>
|
|
73
|
+
""",
|
|
74
|
+
unsafe_allow_html=True,
|
|
75
|
+
)
|
|
76
|
+
else:
|
|
77
|
+
st.link_button("Login with SweatStack", authorization_url)
|
|
72
78
|
|
|
73
79
|
def _get_authorization_url(self):
|
|
74
80
|
params = {
|
|
@@ -7,11 +7,11 @@ sweatstack/jupyterlab_oauth2_startup.py,sha256=eZ6xi0Sa4hO4vUanimq0SqjduHtiywCUR
|
|
|
7
7
|
sweatstack/openapi_schemas.py,sha256=XlgiL7qkfcfoDHcQrIm9e5hvhY98onC0QmZWG69bl-s,13441
|
|
8
8
|
sweatstack/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
9
9
|
sweatstack/schemas.py,sha256=CArM9jgrJDBUT-ZIIiGN_insqaEGV43MX134Ezf4jyA,103
|
|
10
|
-
sweatstack/streamlit.py,sha256=
|
|
10
|
+
sweatstack/streamlit.py,sha256=zBPIC29OvgqvuKNlezgLOTwgvS-Cbg885QFwuW4NMRk,4968
|
|
11
11
|
sweatstack/sweatshell.py,sha256=MYLNcWbOdceqKJ3S0Pe8dwHXEeYsGJNjQoYUXpMTftA,333
|
|
12
12
|
sweatstack/utils.py,sha256=HtR1NNCKus59vfgfaCSFS-tHA11mtdcuUx5lS6ZX58g,1773
|
|
13
13
|
sweatstack/Sweat Stack examples/Getting started.ipynb,sha256=k2hiSffWecoQ0VxjdpDcgFzBXDQiYEebhnAYlu8cgX8,6335204
|
|
14
|
-
sweatstack-0.
|
|
15
|
-
sweatstack-0.
|
|
16
|
-
sweatstack-0.
|
|
17
|
-
sweatstack-0.
|
|
14
|
+
sweatstack-0.27.0.dist-info/METADATA,sha256=YKWKjaX0UYaqA3ODVWZKlOqba4z-xKF0PI5TS8z3P7E,775
|
|
15
|
+
sweatstack-0.27.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
16
|
+
sweatstack-0.27.0.dist-info/entry_points.txt,sha256=kCzOUQI3dqbTpEYqtgYDeiKFaqaA7BMlV6D24BMzCFU,208
|
|
17
|
+
sweatstack-0.27.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|