Skip to main content

Streamlit Sigma.js Component

A streamlit component to visualize network graph data.

Combines Python, Streamlit, Vue3 and Sigma.js.

Key Features

  • Visualize network data
  • Interact with the graph
  • Display additional nodes & edges attributes

(screenshot)

Installation

pip installation

pip install streamlit-sigmajs-component

manual installation from source

Create and activate a python virtual environment (venv, conda, ...)

Clone this repository

git clone https://github.com/camaris2/streamlit_sigmajs_component.git

Navigate to root directory

cd streamlit_sigmajs_component

Install the package in editable mode:

pip install -e .

Using the component

In your streamlit app:

  • import the module:

from vsigma_component import vsigma_component

  • call the component

graph_state = vsigma_component(my_nodes, my_edges, my_settings, key="vsigma")

  • (optional) use the data returned via the graph state object (e.g. selected node or edge, ...)

Run Example App

  • create the environment
    • pip install virtualenv (if you don't already have virtualenv installed)
    • virtualenv venv to create your new environment (called 'venv' here)
    • source venv/bin/activate to enter the virtual environment (unix)
    • venv/bin/activate to enter the virtual environment (windows)

pip install -r requirements.txt to install the requirements in the current environment

  • run the streamlit example app:
cd streamlit_sigmajs_component/vsigma_component
streamlit run example.py

Development

  • Ensure you have Python 3.7+, Node.js, and npm installed.

Clone project

Python Setup

Create and activate a virtual environment, then install the package in editable mode:

python3 -m venv venv # On Windows use python -m venv venv
source ./venv/bin/activate # On Windows use `.\venv\Scripts\activate`
pip install -e .

Node Setup

Navigate to the frontend directory and install the necessary npm packages:

cd vsigma_component/vue_sigma
npm install

Running the App (in development mode)

Change PRODUCTION flag in vsigma_component/init.py to False

  • In one terminal start the frontend dev server
cd vsigma_component/vue_sigma
npm run dev
  • In another terminal run the streamlit server
source ./venv/bin/activate  # Unix
.\venv\Scripts\activate  # Windows
cd vsigma_component
streamlit run example.py

Contributing

Contributions are welcome! Please open an issue or submit a pull request for any improvements or bug fixes.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Acknowledgments

Metadata

Release files for streamlit-sigmajs-component 1.0.5

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-sigmajs-component 1.0.5
File Size Uploaded Provenance Actions
streamlit_sigmajs_component-1.0.5.tar.gz 136.8 kB Without provenance Details for streamlit_sigmajs_component-1.0.5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for streamlit-sigmajs-component 1.0.5
File Interpreter ABI Platform Actions
streamlit_sigmajs_component-1.0.5-py3-none-any.whl Python 3 none any Details for streamlit_sigmajs_component-1.0.5-py3-none-any.whl

Total release size: 1.5 MB

Release files / streamlit_sigmajs_component-1.0.5.tar.gz

Download URL streamlit_sigmajs_component-1.0.5.tar.gz
Size 136.8 kB
Tags Source
SHA-256 checksum
How to use checksums
e16aa6e41d8f2886f5b9557fb68af12800094d0335c89f0b9fa0009d0767623b
BLAKE2b-256 checksum
How to use checksums
0fb7603adfbcec322824e125fcaa7622306ee3137d868c84c41735aa830eda64
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.9.1

Release files / streamlit_sigmajs_component-1.0.5-py3-none-any.whl

Download URL streamlit_sigmajs_component-1.0.5-py3-none-any.whl
Size 1.4 MB
Tags Python 3
SHA-256 checksum
How to use checksums
c02866980a4d8185cea5508e81fe75831d48cf8009a5dfbf0b6f9400f1701366
BLAKE2b-256 checksum
How to use checksums
ff9bfb30d3b5c395a366ffa31498d0db74febd0757010224749d50aca0c46d2b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.9.1

Security for streamlit-sigmajs-component 1.0.5

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