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.4.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

visgraph-0.0.4-py2.py3-none-any.whl (1.7 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

  • Download URL: visgraph-0.0.4.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.4.tar.gz
Algorithm Hash digest
SHA256 8dafab6cc7b5984bc9626dec225ba08be096b35bff2e550dbb58bc2ac942490e
MD5 8dd0acd6e65cf555570cf785e25a46d4
BLAKE2b-256 be6288f79f207c2ae3059921fa805f3b2a53b3bedc340fe65a65910065f146db

See more details on using hashes here.

File details

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

File metadata

  • Download URL: visgraph-0.0.4-py2.py3-none-any.whl
  • Upload date:
  • Size: 1.7 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.4-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 13235811f1bf4da67c258837addc18261035c06b92c64d1bae9062f857944b9b
MD5 30cb29e9c59df75b8ff40dc70812b1f8
BLAKE2b-256 920d686d14ed6f20dedb4a3aecdce875f65f509d02a5683f1335636d016795a4

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