intial python bindings documentation
[rrdtool.git] / doc / rrdpython.pod
1 =head1 NAME
2
3 rrdpython - About the RRD Python bindings
4
5 =head1 SYNOPSIS
6
7  import rrdtool
8  rrdtool.create('/tmp/test.rrd', 'DS:foo:GUAGE:20:0:U')
9
10 =head1 DESCRIPTION
11
12 The B<rrdtool> functions are directly callable via the Python programming
13 language. This wrapper implementation has been written from the scratch
14 (without  SWIG)
15
16 The API's simply expects string parameters to the functions.  Please refer
17 to the other B<rrdtool> documentation for functions and valid arguments.
18
19 =head1 EXAMPLE
20
21  import rrdtool, tempfile
22
23  DAY = 86400
24  YEAR = 365 * DAY
25  fd,path = tempfile.mkstemp('.png')
26
27  rrdtool.graph(path, 
28               '--imgformat', 'PNG',
29               '--width', '540',
30               '--height', '100',
31               '--start', "-%i" % YEAR,
32               '--end', "-1",
33               '--vertical-label', 'Downloads/Day',
34               '--title', 'Annual downloads',
35               '--lower-limit', '0',
36               'DEF:downloads=downloads.rrd:downloads:AVERAGE',
37               'AREA:downloads#990033:Downloads')
38
39  info = rrdtool.info('downloads.rrd')
40  print info['last_update']
41  print info['ds']['downloads']['minimal_heartbeat']
42
43 =head1 SEE ALSO
44
45 rrdcreate, rrdupdate, rrdgraph, rrddump, rrdfetch, rrdtune, rrdlast,
46 rrdxport, rrdinfo
47
48 =head1 AUTHOR
49
50 Hye-Shik Chang E<lt>perky@i18n.orgE<gt>
51
52 Alan Milligan E<lt>alan.milligan@last-bastion.netE<gt>
53