Skip to content

Tanneguydv/pythonocc_streamlit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

a way to interact with pythonocc webbrowser display using streamlit

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages