A library for network visualization and algorithm simulation.
Project description
AlgorithmX Python
AlgorithmX Python is a library for network visualization and algorithm simulation, based on AlgorithmX. It works through either a HTTP server, or as a widget in Jupyter Notebooks and JupyterLab.
Resources
Installation
Python 3.6 or higher is required.
AlgorithmX can be installed using pip:
pip install algorithmx
or using conda:
conda install algorithmx
The Jupyter widget will typically be enabled by default. However, if you installed using pip with notebook version <5.3, you will have to manually enable it using:
jupyter nbextension enable --sys-prefix --py algorithmx
with the appropriate flag.
Example Usage
If you wish to use the library through a HTTP/WebSocket server, follow the template below:
import algorithmx
server = algorithmx.http_server()
canvas = server.canvas()
def start():
canvas.nodes([1, 2]).add()
canvas.edge((1, 2)).add()
canvas.listen('start', start)
server.start()
If you are using Jupyter, add the following to a cell:
import algorithmx
widget = algorithmx.jupyter_widget()
canvas = widget.canvas()
canvas.nodes([1, 2]).add()
canvas.edge((1, 2)).add()
display(widget)
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
Hashes for algorithmx-1.0.0b5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5a102183a0d8888cce713641c6aa40660c8bb777911b642abffdf266947184d4 |
|
MD5 | 0fd4685e8a23ab06bd5b17a9172a5c27 |
|
BLAKE2b-256 | b91c9f5fcca8f541a08f38c6894bfad684bae295f71eceba15add3bf8115ca8b |