Streamlit component for graph visualization
Project description
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).
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 streamlit-layoutr-0.0.1.tar.gz.
File metadata
- Download URL: streamlit-layoutr-0.0.1.tar.gz
- Upload date:
- Size: 93.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6bc054b68651a255d61bca3bd668f96997d90dbce8fdef54bbc2e440992d47ed
|
|
| MD5 |
5fd8532d083749cdc77be5899b0afc92
|
|
| BLAKE2b-256 |
45ac25c55878608c695be193be2e37a4ce8940e0984973322fa703754367d5a9
|
File details
Details for the file streamlit_layoutr-0.0.1-py3-none-any.whl.
File metadata
- Download URL: streamlit_layoutr-0.0.1-py3-none-any.whl
- Upload date:
- Size: 93.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
387814733c3e2aaffcb082739d3d5ba84eddf6f1c1b3a544bc14c2a770529f0f
|
|
| MD5 |
cce96bc75292cf38e9417925577a833c
|
|
| BLAKE2b-256 |
1c1e37d5ba9f743c61c94fa4ca5436ebec2a37c79ff35159384ce14938e9c568
|