Streamlit SweetHome3D
This project have the aim to port an house planner to streamlit in order to use it as a component of some demos including a good view with basic features quickly.
import streamlit as st
from streamlit_sweethome3d import streamlit_sweethome3d
# if you want to use wide screen to see more buttons
# st.set_page_config(layout="wide")
import json
in_state = {
"homes": [
{
"walls": [
[0, 180, 0, 400, 20, 250], # params: x1, y1 x2, y2, spessore, altezza
[350, 180, 350, 400, 20, 250],
[0-10, 180, 350+10, 180, 20, 250]
],
"rooms": [
[[0,180], [350, 180], [350, 400], [0, 400]] # points
],
"furnitures": [
{
"id": "eTeks#shower", # https://gitlab.com/nicolalandro/streamlit-sweethome3d/-/blob/main/FURNITURE_DOC.md
"x": 50,
"y": 230,
"elevation": 0,
}
]
}
]
}
out_state = streamlit_sweethome3d(state = in_state, out_state=True)
col1, col2 = st.columns(2)
with col1:
st.text('in state')
st.code(json.dumps(in_state, indent=1))
with col2:
st.text('out state')
st.code(json.dumps(out_state, indent=1))
Metadata
Release files for streamlit-sweethome3d 0.0.6
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_sweethome3d-0.0.6.tar.gz | 4.3 MB | Details |
Release files / streamlit_sweethome3d-0.0.6.tar.gz
| Download URL | streamlit_sweethome3d-0.0.6.tar.gz |
|---|---|
| Size | 4.3 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
76fb3aebbf6ed7a57d50fb0f2bba81440f6ed82dacda825685ec6636ea3d72ee
|
|
BLAKE2b-256 checksum How to use checksums |
d5f7b2a2be95206f55cbe245d18283bb308bcf76990bfea3ea45ceddcadd8618
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.6
|