Metadata-Version: 2.2
Name: streamlit_sigmajs_component
Version: 0.0.4
Summary: A streamlit component to visualize network graph data using Sigma.js
Home-page: 
Author: camaris
Author-email: camaris <pypi@camaris.be>
License: MIT License
        
        Copyright (c) 2025 Mark Casselman - Camaris
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://github.com/cmaris2/streamlit_sigmajs_component
Project-URL: Issues, https://github.com/camaris2/streamlit_sigmajs_component/issues
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: author
Dynamic: requires-python

# 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

## Manual pip installation

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

Clone this repository

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

Navigate to root directory

```bash
cd streamlit_sigmajs_component
```

Install the package in editable mode:

```bash
pip install -e .
```

## pip installation

Coming soon.

# 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")


## Example

run the streamlit example app:

```bash
cd streamlit_sigmajs_component
streamlit run example.py
```

# Development

- Ensure you have Python 3.7+, Node.js, and npm installed.
- Clone this repository
- Navigate to root directory

## Python Setup

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

```bash
python3 -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:

```bash
cd vsigma_component/vue_sigma
npm install
```

## Running the App

Change PRODUCTION flag in vsigma_component/__init__.py to False

- In one terminal start the frontend dev server

```bash
cd vsigma_component/vue_sigma
npm run start
```

- In another terminal run the streamlit server

```bash
source ./venv/bin/activate # On Windows use `.\venv\Scripts\activate`
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

- [Sigma.js](https://www.sigmajs.org/)
- [Streamlit](https://www.streamlit.io/)
- [Vue3](https://vuejs.org/)
- [Python](https://www.python.org/)
