Streamlit component that allows you to do X
Project description
streamlit-custom-component
Streamlit component that allows you to do X
Installation instructions
pip install streamlit-custom-component
Usage instructions
import streamlit as st
from my_component import my_component
value = my_component()
st.write(value)
Local development
-
Start Streamlit from the project root:
streamlit run my_component/example.py
-
In another terminal, run the Vite dev server from
my_component/frontend:npm install npm run start
Important dev server notes
- The browser connects to the Vite dev server directly. Streamlit does not proxy this port, so the Vite port must be reachable from the client just like the Streamlit port.
- Vite listens on the value of
VITE_PORT(default3001). This variable lives inmy_component/frontend/.env. Update that file whenever you need to change the port, and remember that Windows/WSL/Hyper-V or dev containers may silently remap addresses like3001. - If a port is unavailable or blocked by a firewall/mobile connection, set
VITE_PORT=5173(Vite's default) or any other open port inside the.envfile before runningnpm run start, and ensure that port is reachable from your browser.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file st_custom_component-0.0.1.tar.gz.
File metadata
- Download URL: st_custom_component-0.0.1.tar.gz
- Upload date:
- Size: 4.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
89f1e0194b028687c536759961ff1e57f752163a438440497f0e196cc1fb8855
|
|
| MD5 |
d6496ac79e934b1fbd64b80b9cc548d5
|
|
| BLAKE2b-256 |
1353b14d62e7bf9bb806720424e8db6181c2462a246dbfccea6632679195c582
|
File details
Details for the file st_custom_component-0.0.1-py3-none-any.whl.
File metadata
- Download URL: st_custom_component-0.0.1-py3-none-any.whl
- Upload date:
- Size: 7.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4354cfe75200c9926a8c13ee9212e0ffeefa000c4cefe54319310a5e806bcb49
|
|
| MD5 |
a829cc2b9f08c6a6ab7e872b658ad774
|
|
| BLAKE2b-256 |
e066c9fc3b9b2938e38d81dda2fcb12cf12270dba797d9d243254e6f623ce339
|