streamlit-sweethome3d


Namestreamlit-sweethome3d JSON
Version 0.0.6 PyPI version JSON
download
home_pagehttps://gitlab.com/nicolalandro/streamlit-sweethome3d
SummaryThis library is created for streamlit framework, it allow to creating house and insert furniture based on sweethome3djs with a good 3D view.
upload_time2023-12-17 18:01:29
maintainer
docs_urlNone
authorNicola Landro
requires_python>=3.6
license
keywords 3d house planner streamlit
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            [![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.

![example of UI](https://gitlab.com/nicolalandro/streamlit-sweethome3d/-/raw/main/examples/imgs/screen.png)

```
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))
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://gitlab.com/nicolalandro/streamlit-sweethome3d",
    "name": "streamlit-sweethome3d",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "3d,house planner,streamlit",
    "author": "Nicola Landro",
    "author_email": "nicolaxx94@live.it",
    "download_url": "https://files.pythonhosted.org/packages/d5/f7/b2a2be95206f55cbe245d18283bb308bcf76990bfea3ea45ceddcadd8618/streamlit_sweethome3d-0.0.6.tar.gz",
    "platform": null,
    "description": "[![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)\n\n# Streamlit SweetHome3D\nThis 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.\n\n![example of UI](https://gitlab.com/nicolalandro/streamlit-sweethome3d/-/raw/main/examples/imgs/screen.png)\n\n```\nimport streamlit as st\nfrom streamlit_sweethome3d import streamlit_sweethome3d\n\n# if you want to use wide screen to see more buttons\n# st.set_page_config(layout=\"wide\")\n\nimport json\n\nin_state = {\n    \"homes\": [\n      {\n        \"walls\": [\n          [0, 180, 0, 400, 20, 250], # params: x1, y1 x2, y2, spessore, altezza\n          [350, 180, 350, 400, 20, 250],\n          [0-10, 180, 350+10, 180, 20, 250]\n        ],\n        \"rooms\": [\n          [[0,180], [350, 180], [350, 400], [0, 400]] # points\n        ],\n        \"furnitures\": [\n          {\n            \"id\": \"eTeks#shower\", # https://gitlab.com/nicolalandro/streamlit-sweethome3d/-/blob/main/FURNITURE_DOC.md\n            \"x\": 50,\n            \"y\": 230,\n            \"elevation\": 0,\n          }\n        ]\n      }\n    ]\n}\n\nout_state = streamlit_sweethome3d(state = in_state, out_state=True)\n\ncol1, col2 = st.columns(2)\nwith col1:\n    st.text('in state')\n    st.code(json.dumps(in_state, indent=1))\nwith col2:\n    st.text('out state')\n    st.code(json.dumps(out_state, indent=1))\n```\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "This library is created for streamlit framework, it allow to creating house and insert furniture based on sweethome3djs with a good 3D view.",
    "version": "0.0.6",
    "project_urls": {
        "Homepage": "https://gitlab.com/nicolalandro/streamlit-sweethome3d",
        "Source": "https://gitlab.com/nicolalandro/streamlit-sweethome3d"
    },
    "split_keywords": [
        "3d",
        "house planner",
        "streamlit"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d5f7b2a2be95206f55cbe245d18283bb308bcf76990bfea3ea45ceddcadd8618",
                "md5": "1c83ac67b49b055c8148de3b6b630b0f",
                "sha256": "76fb3aebbf6ed7a57d50fb0f2bba81440f6ed82dacda825685ec6636ea3d72ee"
            },
            "downloads": -1,
            "filename": "streamlit_sweethome3d-0.0.6.tar.gz",
            "has_sig": false,
            "md5_digest": "1c83ac67b49b055c8148de3b6b630b0f",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 4312971,
            "upload_time": "2023-12-17T18:01:29",
            "upload_time_iso_8601": "2023-12-17T18:01:29.855161Z",
            "url": "https://files.pythonhosted.org/packages/d5/f7/b2a2be95206f55cbe245d18283bb308bcf76990bfea3ea45ceddcadd8618/streamlit_sweethome3d-0.0.6.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-12-17 18:01:29",
    "github": false,
    "gitlab": true,
    "bitbucket": false,
    "codeberg": false,
    "gitlab_user": "nicolalandro",
    "gitlab_project": "streamlit-sweethome3d",
    "lcname": "streamlit-sweethome3d"
}
        
Elapsed time: 0.51560s