Skip to main content

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.

Link to PyPI

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


Download files

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

Source Distribution

visgraph-0.0.2.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

visgraph-0.0.2-py2.py3-none-any.whl (7.9 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file visgraph-0.0.2.tar.gz.

File metadata

  • Download URL: visgraph-0.0.2.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.23.0

File hashes

Hashes for visgraph-0.0.2.tar.gz
Algorithm Hash digest
SHA256 8d6d8f5a4ce34cffe05f1f0bb519469ea81f0483303d660a02b53d8b6b39a8e9
MD5 b79ebffb64ef5e44ef51df66da9a70d8
BLAKE2b-256 2c8faa6d9156623f24b3e3cb11d55ffeff1b4bb78514b705df2da25eab3ba1f6

See more details on using hashes here.

File details

Details for the file visgraph-0.0.2-py2.py3-none-any.whl.

File metadata

  • Download URL: visgraph-0.0.2-py2.py3-none-any.whl
  • Upload date:
  • Size: 7.9 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.23.0

File hashes

Hashes for visgraph-0.0.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 096e089c3aed96104727f66cc9660242b25c43aa36cb19b62ac3314db2feb61a
MD5 fa7e4770aeb2d646d720075e29c03290
BLAKE2b-256 1ece40f3f248ca1b4094a287c9cdd10db86ff8de72af04a22eac647496cfc90e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page