Visgraph API allows the user to interface with a visgraph session using python scripts.
Project description
Visgraph API
The Visgraph API allows users to attach python scripts to a running session and perform changes on the graph from the web client.
Usage
Install with pip install visgraph
.
See setup.py and infection_sim.py for example usage.
use asyncio.run(visgraph.connect(url, port, sid, key, title, startParams, simulate))
to start the session.
Get the key from the simulate tab in the client session (unique to each user, users can have multiple keys).
Title is shown in the client.
Start params are passed as a dict, and can be either int, string, float or boolean. Each value requires an attribute (title), type, and defaultValue. These can be accessed from the client interface.
Nodes and edges are passed to the simulate function as lists, and attributes are accessed using the 'data' key.
Params are passed as a dictionary, where each key is the attribute value given in the setup dict.
Contributing
License
TODO
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
File details
Details for the file visgraph-0.0.9.tar.gz
.
File metadata
- Download URL: visgraph-0.0.9.tar.gz
- Upload date:
- Size: 3.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.23.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8662405b30ee958360a214fe412199f402235a7db87bc13aaf79bdda0af4d1e9 |
|
MD5 | b80cff99a6898a40472b0cd76347fc86 |
|
BLAKE2b-256 | aac9d0a871f5b24e4074ea85545dd15135c9bf7b417477aab82fdadd86fb7d07 |
File details
Details for the file visgraph-0.0.9-py2.py3-none-any.whl
.
File metadata
- Download URL: visgraph-0.0.9-py2.py3-none-any.whl
- Upload date:
- Size: 2.7 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.23.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c7b31409a1325735c5db10634f85ab30111d1411c2f33e3dda5dd6e6ce612cf6 |
|
MD5 | e3f720a852bc0df2f882179f4d27f792 |
|
BLAKE2b-256 | 5134a1df9ee6ae931cf5cd237bb4d5fa92a966f0957e03fb52d4a62c7995dfdd |