Streamlit Component Vue Vite Template
A template for creating Streamlit Components. It uses Vue 3 to code the frontend and Vite to serve the files locally during development, as well as bundle and compile them for production.
This repo contains templates and example code for creating Streamlit Components. For complete information, please see the Streamlit Components documentation!
Quickstart
Ensure you have Python 3.6+, Node.js and npm installed.
- Clone this repository:
git clone git@github.com:gabrieltempass/streamlit-component-vue-vite-template.git
- Go to the
frontenddirectory and initialize and run the component template frontend:
cd streamlit-component-vue-vite-template/streamlit_layoutr/frontend
npm install
npm run dev
- From a separate terminal, go to the repository root directory, create a new Python virtual environment, activate it and install Streamlit and the template as an editable package:
cd streamlit-component-vue-vite-template
python3 -m venv venv
. venv/bin/activate
pip install streamlit
pip install -e .
Still from the same separate terminal, run the example Streamlit app:
streamlit run streamlit_layoutr/example.py
If all goes well, you should see something like this:
Modify the frontend code at streamlit_layoutr/frontend/src/MyComponent.vue.
Modify the Python code at streamlit_layoutr/__init__.py.
References
This template is based on:
- the original template made by the Streamlit team, that uses React (instead of Vue 3) and Webpack (instead of Vite).
- streamlit-component-template-vue, by @andfanilo, that uses Vue 2 or 3 and Webpack (instead of Vite).
Metadata
Release files for streamlit-layoutr 0.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| streamlit-layoutr-0.0.3.tar.gz | 94.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| streamlit_layoutr-0.0.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 349.2 kB
Release files / streamlit-layoutr-0.0.3.tar.gz
| Download URL | streamlit-layoutr-0.0.3.tar.gz |
|---|---|
| Size | 94.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
22dff80dea2d36688e336ef0a3ab8c87098fb4a7a285006d443736c535247999
|
|
BLAKE2b-256 checksum How to use checksums |
818bcafdde99897563e73e59b23784c057fb6a5913185c6f2ba65f509f26ac22
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.11
|
Release files / streamlit_layoutr-0.0.3-py3-none-any.whl
| Download URL | streamlit_layoutr-0.0.3-py3-none-any.whl |
|---|---|
| Size | 254.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4f1af2a2917ff61b37b6c1b4e0142d3ad43fe27ef6468dcfe6792cd5925ad66f
|
|
BLAKE2b-256 checksum How to use checksums |
0dbf5c599cdc8c80a320f6b187bbd685f9213311b8a01e226ed5c0eb82bfae2d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.11
|