Program in Visual and Modular Blocks in Python

An open source tool for interactive development.


Program in Visual and Modular Blocks in Python


PyFlow is an interactive Python development tool structured in open source graphs.

With PyFlow you can create code blocks in which you can edit and run Python code, you can move and resize blocks in an infinite 2D plane. Just link the blocks to highlight dependencies, Pyflow will automatically run your blocks in the correct order.


Installation

To get PyFlow on your system you need to use pip and run the following command:

pip install --user byc-pyflow

After the installation is complete, to run PyFlow, just run:

python -m pyflow

The PyFlow window will open, click on File and then on New to create a block scheme.

PyFlow File New


Then right-click on the plane and choose the type of block: Markdown or Code .

PyFlow Code or Markdown


Example of a code block:

PyFlow Code


Example of a Markdown block:

PyFlow Markdown


By clicking on the triangle or square it is possible to create a node and join it to another block. See in this example, I created the variable example in one block and printed it in the other:

PyFlow We


In this other example I created a function that prints a message and in the other node a variable with a URL and in the third node I print the message and I already open the URL in the default browser as soon as I click >> to execute the code:

Click on the image to enlarge and view the code better (it will open in a new tab of your browser).

PyFlow We

To save your project press Ctrl + s .

See the gifs below to learn more about many of the features:

PyFlow


PyFlow Example 2


PyFlow Example 3


Shortcut keys

Shortcut Description
Space Zoom on selection (Center view if no selection)
Navigate between blocks / Inside an editor
Enter Enter a block editor
Alt + Navigate between blocks editors
Echap Clear selection and block focus
Ctrl + + - Zoom in/out

Edition

Shortcut Description
Ctrl + N Create a new graph
Ctrl + C Copy selected blocks to scene clipboard
Ctrl + X Cut selected blocks to scene clipboard
Ctrl + V Paste scene clipboard on mouse location
Ctrl + D Duplicate selected blocks
Shift + Quick create a parent block
Shift + Quick create a child block

Execution

Shortcut Description
Shift + Enter Run block (and its dependencies)

For more information and documentation visit the repository .


python


Share


YouTube channel

Subscribe


Marcos Oliveira

Marcos Oliveira

Software developer
https://github.com/terroo

Related articles