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
To install the library using pip:
pip install algorithmx
To enable the Jupyter widget in classic notebooks:
jupyter nbextension enable --sys-prefix --py algorithmx
To enable in JupyterLab:
# if you haven't used widgets before
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()
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
algorithmx-1.0.0b2.tar.gz
(128.7 kB
view hashes)
Built Distribution
Close
Hashes for algorithmx-1.0.0b2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a1d02ef81f449f7a727de8c0650c704a5c376c733bde2c32e7fdcae375f40bbc |
|
MD5 | eeefc881cf0bdcb903228efe292d5dea |
|
BLAKE2b-256 | ca4094a9cb814d9a991a50ef996aa1fe45a0eece3e2cb29eeee3f2bfe97f43fc |