Skip to main content

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

  1. Change version in setup.py
  2. twine upload dist/*

Developer

Deployment

https://docs.streamlit.io/library/components/publish

python setup.py sdist bdist_wheel

python -m twine upload dist/*

Metadata

Release files for streamlit-flow-node-graph 0.0.10

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for streamlit-flow-node-graph 0.0.10
File Size Uploaded Provenance Actions
streamlit-flow-node-graph-0.0.10.tar.gz 4.4 MB Without provenance Details for streamlit-flow-node-graph-0.0.10.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for streamlit-flow-node-graph 0.0.10
File Interpreter ABI Platform Actions
streamlit_flow_node_graph-0.0.10-py3-none-any.whl Python 3 none any Details for streamlit_flow_node_graph-0.0.10-py3-none-any.whl

Total release size: 13.1 MB

Release files / streamlit-flow-node-graph-0.0.10.tar.gz

Download URL streamlit-flow-node-graph-0.0.10.tar.gz
Size 4.4 MB
Tags Source
SHA-256 checksum
How to use checksums
55fd7fde08ad67505430b6a25aa5b0bbe36c7d0c4ce2959b3857acfc75846331
BLAKE2b-256 checksum
How to use checksums
ca329db873f3e43bb9e6d7e36690599b32891cbc4fd5a98c997025cf024dc30a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.12.1

Release files / streamlit_flow_node_graph-0.0.10-py3-none-any.whl

Download URL streamlit_flow_node_graph-0.0.10-py3-none-any.whl
Size 8.7 MB
Tags Python 3
SHA-256 checksum
How to use checksums
01b286773a33320fac143017d4c60d689540af4aac3a1c70652ea4ad4a0275bd
BLAKE2b-256 checksum
How to use checksums
2b0ffeff0799849f239858092b00279b8219dccd6c617db05bcca387c0730f6c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.12.1

Security for streamlit-flow-node-graph 0.0.10

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page