Skip to main content

A library for network visualization and algorithm simulation.

Project description

AlgorithmX Python

travis PyPI version docs

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

Jupyter Widget

In classic Jupyter notebooks, the 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 by running:

jupyter nbextension enable --sys-prefix --py algorithmx

with the appropriate flag. To enable in JupyterLab, run:

jupyter labextension install @jupyter-widgets/jupyterlab-manager
jupyter labextension install algorithmx-jupyter

Example Usage

If you wish to use the library through a HTTP/WebSocket server, follow the template below:

import algorithmx

server = algorithmx.http_server(port=5050)
canvas = server.canvas()

def start():
    canvas.nodes([1, 2]).add()
    canvas.edge((1, 2)).add()

canvas.listen('start', start)
server.start()

Be default, the output can be found at http://localhost:5050/.

If you are using Jupyter, add the following to a cell:

import algorithmx

canvas = algorithmx.jupyter_canvas()

canvas.nodes([1, 2]).add()
canvas.edge((1, 2)).add()

display(widget)

Project details


Download files

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

Files for algorithmx, version 1.1.0
Filename, size File type Python version Upload date Hashes
Filename, size algorithmx-1.1.0-py3-none-any.whl (1.8 MB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size algorithmx-1.1.0.tar.gz (908.6 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page