streamlit-remote 0.1.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.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Yuichiro Tachibana (Tsuchiya)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,225 @@
1
+ Metadata-Version: 2.4
2
+ Name: streamlit-remote
3
+ Version: 0.1.0
4
+ Summary: Run Streamlit apps with optional remote HTTPS access.
5
+ Author: Yuichiro Tachibana (Tsuchiya)
6
+ Author-email: Yuichiro Tachibana (Tsuchiya) <t.yic.yt@gmail.com>
7
+ License-Expression: MIT
8
+ License-File: LICENSE
9
+ Classifier: Development Status :: 3 - Alpha
10
+ Classifier: Environment :: Console
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: Programming Language :: Python :: 3.10
14
+ Classifier: Programming Language :: Python :: 3.11
15
+ Classifier: Programming Language :: Python :: 3.12
16
+ Classifier: Programming Language :: Python :: 3.13
17
+ Classifier: Topic :: Internet :: WWW/HTTP
18
+ Requires-Dist: cryptography>=42
19
+ Requires-Dist: streamlit>=1.28
20
+ Requires-Python: >=3.10
21
+ Project-URL: Homepage, https://github.com/whitphx/streamlit-remote
22
+ Project-URL: Repository, https://github.com/whitphx/streamlit-remote
23
+ Project-URL: Issues, https://github.com/whitphx/streamlit-remote/issues
24
+ Description-Content-Type: text/markdown
25
+
26
+ # streamlit-remote
27
+
28
+ `streamlit-remote` runs a Streamlit app locally, can serve it over local HTTPS, and can expose it through a temporary remote HTTPS URL.
29
+
30
+ It supports Cloudflare Quick Tunnel, ngrok, and managed self-signed certificates for local HTTPS. It is meant for development, demos, and temporary sharing, similar in spirit to Slidev's remote access workflow.
31
+
32
+ ## Installation
33
+
34
+ ```bash
35
+ pip install streamlit-remote
36
+ ```
37
+
38
+ This package requires Python 3.10 or newer.
39
+
40
+ ## Basic Usage
41
+
42
+ ```bash
43
+ st-remote app.py
44
+ ```
45
+
46
+ This starts Streamlit on `http://localhost:8501`, starts a Cloudflare Quick Tunnel to that local URL, prefixes logs from both child processes, prints the public `trycloudflare.com` URL once Cloudflare reports it, and opens that remote URL in your browser.
47
+
48
+ You can also use the alias:
49
+
50
+ ```bash
51
+ streamlit-remote app.py
52
+ ```
53
+
54
+ ## Options
55
+
56
+ ```bash
57
+ st-remote APP [--port 8501] [--host localhost] [--https off] [--provider cloudflare]
58
+ ```
59
+
60
+ Useful options:
61
+
62
+ ```bash
63
+ st-remote app.py --port 9000
64
+ st-remote app.py --host 0.0.0.0
65
+ st-remote app.py --no-remote
66
+ st-remote app.py --no-browser
67
+ st-remote app.py --dry-run
68
+ st-remote app.py --https self-signed --no-remote
69
+ st-remote app.py --provider ngrok
70
+ st-remote app.py --provider ngrok --tunnel-log-level warn
71
+ st-remote app.py -- --server.headless true
72
+ ```
73
+
74
+ Extra arguments after `--` are passed to `python -m streamlit run`.
75
+
76
+ `st-remote` starts Streamlit in headless mode so Streamlit does not open the local URL automatically. When remote access is enabled, `st-remote` opens the detected remote HTTPS URL instead. Use `--no-browser` to suppress browser opening.
77
+
78
+ ## Local HTTPS
79
+
80
+ By default, Streamlit runs locally over HTTP:
81
+
82
+ ```bash
83
+ st-remote app.py --https off
84
+ ```
85
+
86
+ For local HTTPS, use managed self-signed mode:
87
+
88
+ ```bash
89
+ st-remote app.py --https self-signed --no-remote
90
+ ```
91
+
92
+ `streamlit-remote` creates and reuses a local development certificate in its own cache directory, then passes Streamlit's `server.sslCertFile` and `server.sslKeyFile` options automatically. You do not need to choose filenames or manage generated certificate files.
93
+
94
+ Browsers generally do not trust self-signed certificates by default. You may see a certificate warning unless you manually trust the generated certificate. This mode is intended for local development and testing, not production.
95
+
96
+ Advanced users can pass existing certificate files:
97
+
98
+ ```bash
99
+ st-remote app.py --https cert-files \
100
+ --ssl-cert-file cert.pem \
101
+ --ssl-key-file key.pem
102
+ ```
103
+
104
+ ## Remote Providers
105
+
106
+ ### Cloudflare Tunnel
107
+
108
+ Cloudflare Quick Tunnel requires the `cloudflared` command to be installed and available on `PATH`.
109
+
110
+ Install instructions are available from Cloudflare:
111
+
112
+ https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/downloads/
113
+
114
+ `streamlit-remote` checks for `cloudflared` before starting the tunnel and prints an actionable error if it is missing. It does not install `cloudflared` automatically.
115
+
116
+ ### ngrok
117
+
118
+ ngrok requires the `ngrok` command to be installed and available on `PATH`.
119
+
120
+ Install instructions are available from ngrok:
121
+
122
+ https://ngrok.com/download
123
+
124
+ Configure your ngrok account token before use:
125
+
126
+ ```bash
127
+ ngrok config add-authtoken TOKEN
128
+ ```
129
+
130
+ Then run:
131
+
132
+ ```bash
133
+ st-remote app.py --provider ngrok
134
+ ```
135
+
136
+ ngrok provides HTTPS for the public URL while forwarding to your local Streamlit app. If you combine ngrok with local self-signed HTTPS:
137
+
138
+ ```bash
139
+ st-remote app.py --provider ngrok --https self-signed
140
+ ```
141
+
142
+ ngrok still provides HTTPS for the public URL. The self-signed certificate is used only between the local ngrok agent and Streamlit.
143
+
144
+ ## Tunnel Logs
145
+
146
+ Tunnel provider logs are shown by default:
147
+
148
+ ```bash
149
+ st-remote app.py --tunnel-log-level info
150
+ ```
151
+
152
+ Use a quieter level to reduce provider noise while keeping Streamlit logs visible:
153
+
154
+ ```bash
155
+ st-remote app.py --provider ngrok --tunnel-log-level warn
156
+ st-remote app.py --provider ngrok --tunnel-log-level error
157
+ st-remote app.py --provider ngrok --tunnel-log-level off
158
+ ```
159
+
160
+ `off` suppresses printed tunnel logs but still captures provider output internally when needed to detect the remote URL. ngrok also uses its local agent API as a fallback for URL detection.
161
+
162
+ ## HTTPS Serving vs Remote Access
163
+
164
+ The design treats HTTPS serving and remote access as separate concepts.
165
+
166
+ HTTPS serving means the user-facing URL uses HTTPS. Remote access means the app is reachable from outside your local machine.
167
+
168
+ Cloudflare Quick Tunnel and ngrok usually provide both at once: Streamlit can run locally over plain HTTP, while the provider gives you a public HTTPS URL that forwards to the local app.
169
+
170
+ Local self-signed HTTPS is different: Streamlit itself runs with HTTPS locally. You can use this without remote access, or combine it with a remote provider when you specifically want HTTPS between the tunnel agent and Streamlit.
171
+
172
+ Common combinations:
173
+
174
+ ```text
175
+ --https off + --provider cloudflare
176
+ Public HTTPS via Cloudflare, local HTTP Streamlit.
177
+
178
+ --https off + --provider ngrok
179
+ Public HTTPS via ngrok, local HTTP Streamlit.
180
+
181
+ --https self-signed + --no-remote
182
+ Local HTTPS Streamlit only.
183
+
184
+ --https self-signed + --provider ngrok
185
+ Public HTTPS via ngrok, local HTTPS between ngrok and Streamlit.
186
+ ```
187
+
188
+ For managed self-signed HTTPS with Cloudflare Tunnel, `streamlit-remote` also passes Cloudflare's origin TLS verification flag automatically so `cloudflared` can connect to the local self-signed Streamlit server.
189
+
190
+ ## Security
191
+
192
+ This exposes a local Streamlit app to the internet.
193
+
194
+ Do not use it for sensitive data unless you have proper authentication and access control in place. Cloudflare Quick Tunnel and ngrok are best suited for development, demos, and temporary sharing.
195
+
196
+ Streamlit's built-in SSL configuration is useful for local testing, but it is not a replacement for a production HTTPS reverse proxy.
197
+
198
+ ## Limitations
199
+
200
+ The current package does not include mkcert integration, production Cloudflare named tunnels, authentication, password protection, reverse proxy management, or PyPI publishing automation.
201
+
202
+ ## Roadmap
203
+
204
+ - local HTTPS with mkcert
205
+ - optional auth and access-control integration
206
+
207
+ ## Development
208
+
209
+ ```bash
210
+ uv run pytest
211
+ ```
212
+
213
+ ## Release Management
214
+
215
+ This project uses `scriv-release` for changelog-fragment based releases.
216
+
217
+ For user-visible changes, add a fragment:
218
+
219
+ ```bash
220
+ uv run scriv create --edit
221
+ ```
222
+
223
+ When fragments are merged to `main`, the release workflow opens or updates a changelog preview PR. Merging that preview PR tags the release. Tag pushes matching `v*` run the PyPI publish workflow through Trusted Publishing.
224
+
225
+ The release workflow expects a GitHub App configured through `RELEASE_APP_CLIENT_ID` and `RELEASE_APP_KEY` so release tags can trigger the downstream publish workflow.
@@ -0,0 +1,200 @@
1
+ # streamlit-remote
2
+
3
+ `streamlit-remote` runs a Streamlit app locally, can serve it over local HTTPS, and can expose it through a temporary remote HTTPS URL.
4
+
5
+ It supports Cloudflare Quick Tunnel, ngrok, and managed self-signed certificates for local HTTPS. It is meant for development, demos, and temporary sharing, similar in spirit to Slidev's remote access workflow.
6
+
7
+ ## Installation
8
+
9
+ ```bash
10
+ pip install streamlit-remote
11
+ ```
12
+
13
+ This package requires Python 3.10 or newer.
14
+
15
+ ## Basic Usage
16
+
17
+ ```bash
18
+ st-remote app.py
19
+ ```
20
+
21
+ This starts Streamlit on `http://localhost:8501`, starts a Cloudflare Quick Tunnel to that local URL, prefixes logs from both child processes, prints the public `trycloudflare.com` URL once Cloudflare reports it, and opens that remote URL in your browser.
22
+
23
+ You can also use the alias:
24
+
25
+ ```bash
26
+ streamlit-remote app.py
27
+ ```
28
+
29
+ ## Options
30
+
31
+ ```bash
32
+ st-remote APP [--port 8501] [--host localhost] [--https off] [--provider cloudflare]
33
+ ```
34
+
35
+ Useful options:
36
+
37
+ ```bash
38
+ st-remote app.py --port 9000
39
+ st-remote app.py --host 0.0.0.0
40
+ st-remote app.py --no-remote
41
+ st-remote app.py --no-browser
42
+ st-remote app.py --dry-run
43
+ st-remote app.py --https self-signed --no-remote
44
+ st-remote app.py --provider ngrok
45
+ st-remote app.py --provider ngrok --tunnel-log-level warn
46
+ st-remote app.py -- --server.headless true
47
+ ```
48
+
49
+ Extra arguments after `--` are passed to `python -m streamlit run`.
50
+
51
+ `st-remote` starts Streamlit in headless mode so Streamlit does not open the local URL automatically. When remote access is enabled, `st-remote` opens the detected remote HTTPS URL instead. Use `--no-browser` to suppress browser opening.
52
+
53
+ ## Local HTTPS
54
+
55
+ By default, Streamlit runs locally over HTTP:
56
+
57
+ ```bash
58
+ st-remote app.py --https off
59
+ ```
60
+
61
+ For local HTTPS, use managed self-signed mode:
62
+
63
+ ```bash
64
+ st-remote app.py --https self-signed --no-remote
65
+ ```
66
+
67
+ `streamlit-remote` creates and reuses a local development certificate in its own cache directory, then passes Streamlit's `server.sslCertFile` and `server.sslKeyFile` options automatically. You do not need to choose filenames or manage generated certificate files.
68
+
69
+ Browsers generally do not trust self-signed certificates by default. You may see a certificate warning unless you manually trust the generated certificate. This mode is intended for local development and testing, not production.
70
+
71
+ Advanced users can pass existing certificate files:
72
+
73
+ ```bash
74
+ st-remote app.py --https cert-files \
75
+ --ssl-cert-file cert.pem \
76
+ --ssl-key-file key.pem
77
+ ```
78
+
79
+ ## Remote Providers
80
+
81
+ ### Cloudflare Tunnel
82
+
83
+ Cloudflare Quick Tunnel requires the `cloudflared` command to be installed and available on `PATH`.
84
+
85
+ Install instructions are available from Cloudflare:
86
+
87
+ https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/downloads/
88
+
89
+ `streamlit-remote` checks for `cloudflared` before starting the tunnel and prints an actionable error if it is missing. It does not install `cloudflared` automatically.
90
+
91
+ ### ngrok
92
+
93
+ ngrok requires the `ngrok` command to be installed and available on `PATH`.
94
+
95
+ Install instructions are available from ngrok:
96
+
97
+ https://ngrok.com/download
98
+
99
+ Configure your ngrok account token before use:
100
+
101
+ ```bash
102
+ ngrok config add-authtoken TOKEN
103
+ ```
104
+
105
+ Then run:
106
+
107
+ ```bash
108
+ st-remote app.py --provider ngrok
109
+ ```
110
+
111
+ ngrok provides HTTPS for the public URL while forwarding to your local Streamlit app. If you combine ngrok with local self-signed HTTPS:
112
+
113
+ ```bash
114
+ st-remote app.py --provider ngrok --https self-signed
115
+ ```
116
+
117
+ ngrok still provides HTTPS for the public URL. The self-signed certificate is used only between the local ngrok agent and Streamlit.
118
+
119
+ ## Tunnel Logs
120
+
121
+ Tunnel provider logs are shown by default:
122
+
123
+ ```bash
124
+ st-remote app.py --tunnel-log-level info
125
+ ```
126
+
127
+ Use a quieter level to reduce provider noise while keeping Streamlit logs visible:
128
+
129
+ ```bash
130
+ st-remote app.py --provider ngrok --tunnel-log-level warn
131
+ st-remote app.py --provider ngrok --tunnel-log-level error
132
+ st-remote app.py --provider ngrok --tunnel-log-level off
133
+ ```
134
+
135
+ `off` suppresses printed tunnel logs but still captures provider output internally when needed to detect the remote URL. ngrok also uses its local agent API as a fallback for URL detection.
136
+
137
+ ## HTTPS Serving vs Remote Access
138
+
139
+ The design treats HTTPS serving and remote access as separate concepts.
140
+
141
+ HTTPS serving means the user-facing URL uses HTTPS. Remote access means the app is reachable from outside your local machine.
142
+
143
+ Cloudflare Quick Tunnel and ngrok usually provide both at once: Streamlit can run locally over plain HTTP, while the provider gives you a public HTTPS URL that forwards to the local app.
144
+
145
+ Local self-signed HTTPS is different: Streamlit itself runs with HTTPS locally. You can use this without remote access, or combine it with a remote provider when you specifically want HTTPS between the tunnel agent and Streamlit.
146
+
147
+ Common combinations:
148
+
149
+ ```text
150
+ --https off + --provider cloudflare
151
+ Public HTTPS via Cloudflare, local HTTP Streamlit.
152
+
153
+ --https off + --provider ngrok
154
+ Public HTTPS via ngrok, local HTTP Streamlit.
155
+
156
+ --https self-signed + --no-remote
157
+ Local HTTPS Streamlit only.
158
+
159
+ --https self-signed + --provider ngrok
160
+ Public HTTPS via ngrok, local HTTPS between ngrok and Streamlit.
161
+ ```
162
+
163
+ For managed self-signed HTTPS with Cloudflare Tunnel, `streamlit-remote` also passes Cloudflare's origin TLS verification flag automatically so `cloudflared` can connect to the local self-signed Streamlit server.
164
+
165
+ ## Security
166
+
167
+ This exposes a local Streamlit app to the internet.
168
+
169
+ Do not use it for sensitive data unless you have proper authentication and access control in place. Cloudflare Quick Tunnel and ngrok are best suited for development, demos, and temporary sharing.
170
+
171
+ Streamlit's built-in SSL configuration is useful for local testing, but it is not a replacement for a production HTTPS reverse proxy.
172
+
173
+ ## Limitations
174
+
175
+ The current package does not include mkcert integration, production Cloudflare named tunnels, authentication, password protection, reverse proxy management, or PyPI publishing automation.
176
+
177
+ ## Roadmap
178
+
179
+ - local HTTPS with mkcert
180
+ - optional auth and access-control integration
181
+
182
+ ## Development
183
+
184
+ ```bash
185
+ uv run pytest
186
+ ```
187
+
188
+ ## Release Management
189
+
190
+ This project uses `scriv-release` for changelog-fragment based releases.
191
+
192
+ For user-visible changes, add a fragment:
193
+
194
+ ```bash
195
+ uv run scriv create --edit
196
+ ```
197
+
198
+ When fragments are merged to `main`, the release workflow opens or updates a changelog preview PR. Merging that preview PR tags the release. Tag pushes matching `v*` run the PyPI publish workflow through Trusted Publishing.
199
+
200
+ The release workflow expects a GitHub App configured through `RELEASE_APP_CLIENT_ID` and `RELEASE_APP_KEY` so release tags can trigger the downstream publish workflow.
@@ -0,0 +1,62 @@
1
+ [project]
2
+ name = "streamlit-remote"
3
+ version = "0.1.0"
4
+ description = "Run Streamlit apps with optional remote HTTPS access."
5
+ readme = "README.md"
6
+ license = "MIT"
7
+ license-files = ["LICENSE"]
8
+ authors = [
9
+ { name = "Yuichiro Tachibana (Tsuchiya)", email = "t.yic.yt@gmail.com" }
10
+ ]
11
+ requires-python = ">=3.10"
12
+ classifiers = [
13
+ "Development Status :: 3 - Alpha",
14
+ "Environment :: Console",
15
+ "Intended Audience :: Developers",
16
+ "Programming Language :: Python :: 3",
17
+ "Programming Language :: Python :: 3.10",
18
+ "Programming Language :: Python :: 3.11",
19
+ "Programming Language :: Python :: 3.12",
20
+ "Programming Language :: Python :: 3.13",
21
+ "Topic :: Internet :: WWW/HTTP",
22
+ ]
23
+ dependencies = [
24
+ "cryptography>=42",
25
+ "streamlit>=1.28",
26
+ ]
27
+
28
+ [project.urls]
29
+ Homepage = "https://github.com/whitphx/streamlit-remote"
30
+ Repository = "https://github.com/whitphx/streamlit-remote"
31
+ Issues = "https://github.com/whitphx/streamlit-remote/issues"
32
+
33
+ [project.scripts]
34
+ st-remote = "streamlit_remote.cli:main"
35
+ streamlit-remote = "streamlit_remote.cli:main"
36
+
37
+ [dependency-groups]
38
+ dev = [
39
+ "pytest>=8.0",
40
+ "scriv-release>=0.7",
41
+ ]
42
+
43
+ [tool.scriv]
44
+ categories = ["Added", "Changed", "Deprecated", "Removed", "Fixed", "Security", "Chore"]
45
+ format = "md"
46
+ md_header_level = 2
47
+
48
+ [tool.scriv-release]
49
+ version_provider = "uv"
50
+
51
+ [tool.scriv-release.category_semver_map]
52
+ Added = "minor"
53
+ Changed = "minor"
54
+ Deprecated = "minor"
55
+ Removed = "major"
56
+ Fixed = "patch"
57
+ Security = "patch"
58
+ Chore = "patch"
59
+
60
+ [build-system]
61
+ requires = ["uv_build>=0.11.8,<0.12.0"]
62
+ build-backend = "uv_build"
@@ -0,0 +1 @@
1
+ __version__ = "0.1.0"