Skip to main content

Interactive Graph Vis for Streamlit.

Project description

Based on react-d3-graph

Install

pip install streamlit-agraph

Use

import streamlit
from streamlit_agraph import agraph, Node, Edge, Config

nodes = []
edges = []
nodes.append( Node(id="Spiderman", size=400, svg="http://marvel-force-chart.surge.sh/marvel_force_chart_img/top_spiderman.png") )
nodes.append( Node(id="Captain_Marvel", size=400, svg="http://marvel-force-chart.surge.sh/marvel_force_chart_img/top_captainmarvel.png") )
edges.append( Edge(source="Captain_Marvel", target="Spiderman", type="CURVE_SMOOTH") )

config = Config(width=500, 
                height=500, 
                directed=True,
                nodeHighlightBehavior=True, 
                highlightColor="#F7A7A6", # or "blue"
                directed=True, 
                collapsible=True,
                # coming soon (set for all): node_size=1000, node_color="blue"
                ) 

return_value = agraph(nodes=nodes, 
                      edges=edges, 
                      config=config)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

streamlit_agraph-0.0.28-py3-none-any.whl (695.9 kB view details)

Uploaded Python 3

File details

Details for the file streamlit_agraph-0.0.28-py3-none-any.whl.

File metadata

  • Download URL: streamlit_agraph-0.0.28-py3-none-any.whl
  • Upload date:
  • Size: 695.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/46.1.3.post20200325 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.2

File hashes

Hashes for streamlit_agraph-0.0.28-py3-none-any.whl
Algorithm Hash digest
SHA256 d6de04c2caac46cfade85acbd8b3446553f4d50210329c03e963a9be6cb43e03
MD5 4d5c27532a3c1db14963c85be0440571
BLAKE2b-256 29e1194bf0464a50f81da93401665d49fc63197564ddb7f7c4a42800a56c11f2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page