Skip to main content

Graphviz syntax wrapper. Draw graphs with pure python.

Project description

Grot is a noun and means arrowhead in polish language.

Makes graphviz usage simpler

Much less headache. Gets you faster into the point.

import os
from grot import Grot

this_dir_path = os.path.dirname(__file__)  # if run in console - remove 'directory' parameter below
out_dir_path = os.path.join(this_dir_path, 'out')

g = Grot(name='example_01', format='png', directory=out_dir_path, graph_attrs={"rankdir": "LR"})

one = g.node("It is\neaiser")
two = g.node("graphs", color="#8a9bac")
ignored = g.node("Node floats when\nunconnected", color="#da3080")

g.edge(one, "to define", two)

Rendered graph image

It will generate a example_01.png file in current directory.

Refer to tests and examples for more features information.

Download files

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

Files for grot, version 0.1.2
Filename, size File type Python version Upload date Hashes
Filename, size grot-0.1.2-py2.py3-none-any.whl (7.2 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size grot-0.1.2.tar.gz (12.4 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page