Pencil is a simple wrapper around Graphite URL API
You can report bugs and discuss features on the issues page.
Pencil is straightforward to use :
>>> from pencil import Pencil
>>> pencil = Pencil(begin="-12hours").set_title("Network").add_metric("front.network.eth0.if_*").area_mode("stacked")
>>> pencil.url("http://graphite.local/render/", 510, 318)
'http://graphite.local/render/?fontName=Helvetica&lineMode=slope&from=-12hours&target=front.network.eth0.if_%2A&title=Network&areaMode=stacked&graphType=line&height=318&bgcolor=FFFFFF&width=510&template=alphas&fgcolor=000000'
Add a deploy metric
Add a metric to image, may be either a graphite path or a function (such as avg)
May be “none”, “first”, “stacked” or “all”. This causes the area under lines to be shaded in, when using “all” you may need to use an alpha masked color
Default : “none”
Set output format as “csv” or “json”
Default : None
Setup graph type, “line” or “pie”
Default : “line”
Hides both the x and y axis labels as well as the background grid
Hides the graph legend
May be either “slope” or “staircase”
Default : “slope”
Sets the line thickness, by default this is set depending on the size of the image
Set image background color
Default : white
Set font color
Default : black
Set font for text
Default : “Helvetica”
Used for alternate coloring schemes
Default : “alphas”
Set the image title
Set the image vertical title
Return image url based on the given URL for Graphite
yMax set the maximun y-value for the generated image
yMin set the minimum y value for the generated image