Skip to main content

A highly interactive visual programming language

Project description

Grapycal

image

Grapycal is a visual scripting language based on Python. It provides a web-based editor for writing and ruunnig programs as a graph.

The goal of this project is to make a programming language match human perception at best, while being powerful with the help of Python, its backend.

Features:

  • Interactive: On the GUI, users can run different parts of the graph in arbitrary order, inspect variables in real-time with data visualizers, and easily track the active node while the program runs.

  • Dynamic: Grapycal runs a graph in real-time without compiling, allowing users to modify the running graph for instant changes in its behavior. That includes adjusting node parameters, adding or removing nodes from a workflow, and terminating a loop at any time.

  • Extendable: Grapycal provides a Python API allowing users to create custom nodes for any domain, such as deep learning, robotics, or music synthesis. Node developers can add UI controls including ports, input boxes, images, and buttons to a node with few lines of code.

  • Collaborative: Custom node definitions can be shared as Python packages for others to use. Thus, nodes for various domains can be mixed in a graph to form a powerful tool or a creative artwork (I’ll create some examples when I have time). What’s more, Grapycal can interact with multiple clients simultaneously, allowing a group of people to work on the same graph over the Internet.

Grapycal is not (yet):

  • Fast: Grapycal is yet another layer of abstraction on top of Python. Some overhead is introduced for its interactivity and dynamics. However, the overhead would be relatively small if the graph doesn’t run at a high frequency ( less than ~1000 node runs per second ). For example, if your program mainly computes with C extensions (such as NumPy) or uses GPU heavily (such as deep learning tasks), you shouldn’t feel an impact on performance.

  • Stable: Grapycal is not heavily tested to ensure the graph always runs as expected.

Motivation

The strength of Grapycal lies not in writing stable and well-defined programs, but in conducting experiments, including training AI, physical simulations, data analysis, computer art, and more. These experiments require repeated parameter adjustments, swapping certain components of models, while simultaneously observing the phenomena generated by different parameters. We then use human judgment combined with domain knowledge to deduce the best model or certain other conclusions.

In this back-and-forth process between human and machine, using traditional Python execution methods or Jupyter notebooks can be quite sluggish. Therefore, we need the higher interactivity provided by Grapycal.

Documentation

The full documentaition can be found here.

Installation (for Development)

backend:

cd backend
pip install -e .

or

cd backend
poetry install

frontend:

cd frontend
npm install

Dependencies

Grapycal and its dependences consist of the following 6 packages:

Run App (for Development)

  1. run Grapycal server
python -m grapycal
  1. run web server
cd frontend
npm run app
  1. Go to localhost:9001 with a web browser.

Scan dependencies license

cd frontend
license-checker --summary > licenses.txt

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

grapycal-0.5.0.tar.gz (31.2 kB view hashes)

Uploaded Source

Built Distribution

grapycal-0.5.0-py3-none-any.whl (38.0 kB view hashes)

Uploaded Python 3

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