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

Uploaded Source

Built Distribution

visgraph-0.0.6-py2.py3-none-any.whl (2.7 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

  • Download URL: visgraph-0.0.6.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.6.tar.gz
Algorithm Hash digest
SHA256 5767fdda98a10c2750ad217585368ba6f9fed249804f217f604b972f6e8aa9fa
MD5 7d8a82787fb46748c03f29b1c6d62b07
BLAKE2b-256 e941a39408bbc1be2516e6e6a27457434c96a97a0ffd891c20e180c01b27f6ae

See more details on using hashes here.

File details

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

File metadata

  • Download URL: visgraph-0.0.6-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

Hashes for visgraph-0.0.6-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 7f6c2a37afb05a799bfd980906fc2f21b8bf0ea240e21d008f7c6c8ff92591c5
MD5 56df9de4690e9fceb593d70623a15682
BLAKE2b-256 7f718fb0433af1966f9490b80539362dd7a9dbd890fe5cbafe16607acf5a4e00

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