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.

from grot import Grot

g = Grot(filename='example_01', format='png')

one = g.node("It is\neaiser")
two = "to define"
three = g.node("graphs")

g.edge(one, two, three)

assert g.source == r"""digraph test_grot {
    graph [fontname=helvetica nodesep=0.5 ranksep=0.5 sep=0.4]
    node [color="#13136c" fontname=helvetica penwidth=1.8 shape=box]
    edge [fontname=helvetica]
    n_a [label="It is\neaiser"]
    n_1 [label=graphs]
    n_d [label="to define" shape=none]
    n_a -> n_d
    n_d -> n_1
# to generate a pdf, call:


Rendered graph image

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

Refer to tests 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.

Source Distribution

grot-0.1.0.tar.gz (8.6 kB view hashes)

Uploaded source

Built Distribution

grot-0.1.0-py2.py3-none-any.whl (6.9 kB view hashes)

Uploaded py2 py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page