Streamlit component that allows you to do X
Project description
Usage
Installation
pip install streamlit-flow-node-graph
Create a graph element
# define items the user can use
item_types = [
{"title":'Test 1',"color":"rgb(255,0, 192)", "port_selection" : 'out'},
{"title":'Test 2',"color":"rgb(255, 0, 192)", "port_selection" : 'in'},
{"title":'Test 3',"color":"rgb(0,255, 192)", "port_selection" : 'both'},
]
diagram = node_graph.node_graph(model=model, item_types=item_types, key='test' )
st.write(diagram.selected) # access currently selected node id
st.write(diagram.model) # access the underlysing model
Features
- specify a node icon with the icon property e.g.
{"title":'Purchase',"color":"rgb(255,0, 192)", "port_selection" : 'out', "icon" : 'shopping-cart'}(icons in the font-awesome collection can be used) - use diagram utils
diagram = node_graph.node_graph(model=model, item_types=item_types, key='`test`' )
digram.get_selected_node()
diagram.get_all_nodes_node_inputs()
formated_nodes, formated_links = diagram.process_diagram_output()
Contribute
Start dev
cd node_graph/frontend && npm install && npm run start
uncomment # _RELEASE = True in node_graph/__init__.py and in another shell
streamlit run node_graph/__init__.py
Build
cd node_graph/frontend && npm build
cd../..
rm -rf dist/*
python setup.py sdist bdist_wheel
Upload
- Change version in
setup.py twine upload dist/*
Developer
Deployment
https://docs.streamlit.io/library/components/publish
python setup.py sdist bdist_wheel
python -m twine upload dist/*
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file streamlit-flow-node-graph-0.0.10.tar.gz.
File metadata
- Download URL: streamlit-flow-node-graph-0.0.10.tar.gz
- Upload date:
- Size: 4.4 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
55fd7fde08ad67505430b6a25aa5b0bbe36c7d0c4ce2959b3857acfc75846331
|
|
| MD5 |
5c12145aa7049fe4763ea3b9bea69c16
|
|
| BLAKE2b-256 |
ca329db873f3e43bb9e6d7e36690599b32891cbc4fd5a98c997025cf024dc30a
|
File details
Details for the file streamlit_flow_node_graph-0.0.10-py3-none-any.whl.
File metadata
- Download URL: streamlit_flow_node_graph-0.0.10-py3-none-any.whl
- Upload date:
- Size: 8.7 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
01b286773a33320fac143017d4c60d689540af4aac3a1c70652ea4ad4a0275bd
|
|
| MD5 |
9955c29209dfa1e44132b6115aa5f4d9
|
|
| BLAKE2b-256 |
2b0ffeff0799849f239858092b00279b8219dccd6c617db05bcca387c0730f6c
|