Metadata-Version: 2.1
Name: streamlit_sweethome3d
Version: 0.0.4
Summary: This library is created for streamlit framework, it allow to creating house and insert furniture based on sweethome3djs with a good 3D view.
Home-page: https://gitlab.com/nicolalandro/streamlit-sweethome3d
Author: Nicola Landro
Author-email: nicolaxx94@live.it
Project-URL: Source, https://gitlab.com/nicolalandro/streamlit-sweethome3d
Keywords: 3d,house planner,streamlit
Requires-Python: >=3.6
Description-Content-Type: text/markdown

[![Open in Huggingface](https://huggingface.co/datasets/huggingface/badges/raw/refs%2Fpr%2F11/open-in-hf-spaces-md-dark.svg)](https://huggingface.co/spaces/z-uo/SweetHome3DPlanner)

# 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

import json

st.header("Sweet Home 3D")
st.markdown("This is an example of [streamlit_sweethome3d](https://gitlab.com/nicolalandro/streamlit-sweethome3d) plugin.")

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", # complete doc here 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=2))
with col2:
    st.text('out state')
    st.code(out_state)
```
