Skip to content

Latest commit

 

History

History
36 lines (24 loc) · 1.02 KB

README.md

File metadata and controls

36 lines (24 loc) · 1.02 KB

pythonocc_streamlit

a way to interact with pythonocc webbrowser display using streamlit

Installation

Prerequisites:

  1. streamlit: https://streamlit.io/
  2. pythonocc-core: https://github.com/tpaviot/pythonocc-core
# first create an environment
conda create --name=pyoccenv python=3.9
source activate pyoccenv  /alternate command/ conda activate pyoccenv
conda install -c conda-forge pythonocc-core=7.7.0
pip install streamlit

Usage

In your terminal, with your conda env activated, just type:

streamlit run path_to_your_file/example_streamlit_pythonocc.py

Examples

Here a small example of application:

screenshot_1 screenshot_2

How it works

As pythonocc server refresh when streamlit rerun, we had to let the .render() function return the new server's address to pass it to the iframe