sweatstack 0.25.2__tar.gz → 0.27.0__tar.gz

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.
Files changed (27) hide show
  1. {sweatstack-0.25.2 → sweatstack-0.27.0}/PKG-INFO +2 -2
  2. {sweatstack-0.25.2 → sweatstack-0.27.0}/pyproject.toml +2 -2
  3. {sweatstack-0.25.2 → sweatstack-0.27.0}/src/sweatstack/streamlit.py +34 -28
  4. {sweatstack-0.25.2 → sweatstack-0.27.0}/.gitignore +0 -0
  5. {sweatstack-0.25.2 → sweatstack-0.27.0}/.python-version +0 -0
  6. {sweatstack-0.25.2 → sweatstack-0.27.0}/DEVELOPMENT.md +0 -0
  7. {sweatstack-0.25.2 → sweatstack-0.27.0}/Makefile +0 -0
  8. {sweatstack-0.25.2 → sweatstack-0.27.0}/README.md +0 -0
  9. {sweatstack-0.25.2 → sweatstack-0.27.0}/playground/.ipynb_checkpoints/Untitled-checkpoint.ipynb +0 -0
  10. {sweatstack-0.25.2 → sweatstack-0.27.0}/playground/README.md +0 -0
  11. {sweatstack-0.25.2 → sweatstack-0.27.0}/playground/Sweat Stack examples/Getting started.ipynb +0 -0
  12. {sweatstack-0.25.2 → sweatstack-0.27.0}/playground/Untitled.ipynb +0 -0
  13. {sweatstack-0.25.2 → sweatstack-0.27.0}/playground/hello.py +0 -0
  14. {sweatstack-0.25.2 → sweatstack-0.27.0}/playground/pyproject.toml +0 -0
  15. {sweatstack-0.25.2 → sweatstack-0.27.0}/src/sweatstack/Sweat Stack examples/Getting started.ipynb +0 -0
  16. {sweatstack-0.25.2 → sweatstack-0.27.0}/src/sweatstack/__init__.py +0 -0
  17. {sweatstack-0.25.2 → sweatstack-0.27.0}/src/sweatstack/cli.py +0 -0
  18. {sweatstack-0.25.2 → sweatstack-0.27.0}/src/sweatstack/client.py +0 -0
  19. {sweatstack-0.25.2 → sweatstack-0.27.0}/src/sweatstack/constants.py +0 -0
  20. {sweatstack-0.25.2 → sweatstack-0.27.0}/src/sweatstack/ipython_init.py +0 -0
  21. {sweatstack-0.25.2 → sweatstack-0.27.0}/src/sweatstack/jupyterlab_oauth2_startup.py +0 -0
  22. {sweatstack-0.25.2 → sweatstack-0.27.0}/src/sweatstack/openapi_schemas.py +0 -0
  23. {sweatstack-0.25.2 → sweatstack-0.27.0}/src/sweatstack/py.typed +0 -0
  24. {sweatstack-0.25.2 → sweatstack-0.27.0}/src/sweatstack/schemas.py +0 -0
  25. {sweatstack-0.25.2 → sweatstack-0.27.0}/src/sweatstack/sweatshell.py +0 -0
  26. {sweatstack-0.25.2 → sweatstack-0.27.0}/src/sweatstack/utils.py +0 -0
  27. {sweatstack-0.25.2 → sweatstack-0.27.0}/uv.lock +0 -0
@@ -1,9 +1,9 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sweatstack
3
- Version: 0.25.2
3
+ Version: 0.27.0
4
4
  Summary: The official Python client for SweatStack
5
5
  Author-email: Aart Goossens <aart@gssns.io>
6
- Requires-Python: >=3.12
6
+ Requires-Python: >=3.9
7
7
  Requires-Dist: httpx>=0.28.1
8
8
  Requires-Dist: pandas>=2.2.3
9
9
  Requires-Dist: pyarrow>=18.0.0
@@ -1,12 +1,12 @@
1
1
  [project]
2
2
  name = "sweatstack"
3
- version = "0.25.2"
3
+ version = "0.27.0"
4
4
  description = "The official Python client for SweatStack"
5
5
  readme = "README.md"
6
6
  authors = [
7
7
  { name = "Aart Goossens", email = "aart@gssns.io" }
8
8
  ]
9
- requires-python = ">=3.12"
9
+ requires-python = ">=3.9"
10
10
  dependencies = [
11
11
  "httpx>=0.28.1",
12
12
  "pandas>=2.2.3",
@@ -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
- st.markdown(
45
- f"""
46
- <style>
47
- .animated-button {{
48
- }}
49
- .animated-button:hover {{
50
- transform: scale(1.05);
51
- }}
52
- .animated-button:active {{
53
- transform: scale(1);
54
- }}
55
- </style>
56
- <a href="{authorization_url}"
57
- target="_top"
58
- class="animated-button"
59
- style="display: inline-block;
60
- padding: 10px 20px;
61
- background-color: #EF2B2D;
62
- color: white;
63
- text-decoration: none;
64
- border-radius: 6px;
65
- border: none;
66
- transition: all 0.3s ease;
67
- cursor: pointer;"
68
- >Login with SweatStack</a>
69
- """,
70
- unsafe_allow_html=True,
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 = {
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes