Skip to main content

QGraphViz

A PyQT based GraphViz builder/renderer (100% opensource)

Introduction

I was searching for a handy tool to code graphs using python then visualize them within my software. I found about graphviz which is a great tool to build graphs.

The problem is that you need to install the graphviz software in order to compile your file and render it.

There is a graphviz package on PYPI that allows creating dot code that can then be processed by graphviz, but in practice, you need to install graphviz and somehow add it to your path in order to execute the render command.

PyGraphviz is another package that can be used. But as you can read in their documentation, you still need to install Graphviz.

I also found this visualizer based on pyQt4. It is a simple Qt based visualizer that tracks the updates on the .gv file and redraws it in realtime: DDorch/GraphVizLiveUpdateViewer

So since I didn't find any package out there that satifies my needs, I decided to create a pyQT5 based Graphviz tool that can visualize Graphviz code without the need to install Graphviz and provide it with MIT licence, so that other people can simply use it in their software.

Objective

Build python pyQT5 based QWidget that can visualize graphs and allow realtime interaction with graphs add edges and nodes, change attributes ...

Requirements

As its name suggests, this module needs you to install pyqt5 package first.

pip install pyqt5

Installation

pip install QGraphViz

Actual status

  1. Simple graphs visualization (nodes + edges)
  2. Simple gv files read/write
  3. Graph nodes can hold custom parameters that can be used by the application
  4. Graph nodes are now manipulable and we can add nodes and link them using the QWidget gui, wa can also delete nodes.
  5. The application can accept or refuse edges creation and even add custom parameters to the edges
  6. The nodes can be double clicked and an event is sent to the application allowing it to do custom
  7. User application is informed wen a new connection is created between two nodes, when a node is selected or when it is double clicked.
  8. User application is informed when a edge is selected or double clicked.
  9. Only two supported node shapes (box or oval)
  10. Advanced nodes shapes are not yet implemented
  11. Subgraphs are not supported yet
  12. Only the dot layout is implemented

Example code

You can find an example code for manipulating graphs in examples/QGraphViewer.py.

Change log

To view different changes from release to the other please view our changelog.

Warning

If you are aiming to export a .gv file of your graph, don't use images as shapes because this is not supported by real graphviz tool. You can use it safely if you save your graph in our json format.

Special thanks

Here I'll be siting the contributions of others than myself and show them gratitude for help :

  • Many thanks to Ederrod for adding icon shaped nodes.

If any one has ideas to enhance this tool, you are welcome to contribute.

Download files

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

Source Distribution

QGraphViz-0.0.36.tar.gz (12.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

QGraphViz-0.0.36-py3-none-any.whl (15.1 kB view details)

Uploaded Python 3

File details

Details for the file QGraphViz-0.0.36.tar.gz.

File metadata

  • Download URL: QGraphViz-0.0.36.tar.gz
  • Upload date:
  • Size: 12.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.0 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.6.6

File hashes

Hashes for QGraphViz-0.0.36.tar.gz
Algorithm Hash digest
SHA256 54ad65546d5e645b2171365fc31f4bfcd6989fb5905e2195820fce2522ecffe3
MD5 2aa71c72e3986d906ff04cd411d07093
BLAKE2b-256 82346ac9740eb900a91e7bb714762a2494e70bbd2816b7e02dc7f0120e511c90

See more details on using hashes here.

File details

Details for the file QGraphViz-0.0.36-py3-none-any.whl.

File metadata

  • Download URL: QGraphViz-0.0.36-py3-none-any.whl
  • Upload date:
  • Size: 15.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.0 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.6.6

File hashes

Hashes for QGraphViz-0.0.36-py3-none-any.whl
Algorithm Hash digest
SHA256 096b2482ccb876af8c9f6d4d0b7a3a4a1f7aef8b07a9a4e53b15055655fdc372
MD5 0390c6359f3acdeea740621592b54038
BLAKE2b-256 00ab29b6dcb6ed96e1485cd4fcb3ce993f1d6b96863b7bac0d55c5009861065e

See more details on using hashes here.

Release history Release notifications | RSS feed

0.0.55

2 files

0.0.54

2 files

0.0.49

2 files

0.0.48

2 files

0.0.47

2 files

0.0.46

2 files

0.0.45

1 file

0.0.44

1 file

0.0.43

2 files

0.0.42

1 file

0.0.41

2 files

0.0.40

2 files

0.0.39

2 files

0.0.38

2 files

0.0.37

2 files

This release

0.0.36 This release

2 files

0.0.35

2 files

0.0.34

2 files

0.0.33

2 files

0.0.32

2 files

0.0.31

2 files

0.0.30

1 file

0.0.29

1 file

0.0.28

1 file

0.0.27

1 file

0.0.26

1 file

0.0.25

1 file

0.0.24

1 file

0.0.23

1 file

0.0.22

1 file

0.0.21

1 file

0.0.20

1 file

0.0.19

1 file

0.0.18

1 file

0.0.17

1 file

0.0.16

1 file

0.0.15

1 file

0.0.14

1 file

0.0.13

1 file

0.0.12

1 file

0.0.11

1 file

0.0.10

1 file

0.0.9

1 file

0.0.8

1 file

0.0.7

1 file

0.0.6

1 file

0.0.5

1 file

0.0.4

1 file

0.0.3

1 file

0.0.2

1 file

0.0.1

1 file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page