intial python bindings documentation
authoroetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa>
Wed, 11 May 2005 18:31:00 +0000 (18:31 +0000)
committeroetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa>
Wed, 11 May 2005 18:31:00 +0000 (18:31 +0000)
git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.2/program@543 a5681a0c-68f1-0310-ab6d-d61299d08faa

doc/rrdpython.pod [new file with mode: 0644]

diff --git a/doc/rrdpython.pod b/doc/rrdpython.pod
new file mode 100644 (file)
index 0000000..a158577
--- /dev/null
@@ -0,0 +1,53 @@
+=head1 NAME
+
+rrdpython - About the RRD Python bindings
+
+=head1 SYNOPSIS
+
+ import rrdtool
+ rrdtool.create('/tmp/test.rrd', 'DS:foo:GUAGE:20:0:U')
+
+=head1 DESCRIPTION
+
+The B<rrdtool> functions are directly callable via the Python programming
+language. This wrapper implementation has been written from the scratch
+(without  SWIG)
+
+The API's simply expects string parameters to the functions.  Please refer
+to the other B<rrdtool> documentation for functions and valid arguments.
+
+=head1 EXAMPLE
+
+ import rrdtool, tempfile
+
+ DAY = 86400
+ YEAR = 365 * DAY
+ fd,path = tempfile.mkstemp('.png')
+
+ rrdtool.graph(path, 
+              '--imgformat', 'PNG',
+              '--width', '540',
+              '--height', '100',
+              '--start', "-%i" % YEAR,
+              '--end', "-1",
+              '--vertical-label', 'Downloads/Day',
+              '--title', 'Annual downloads',
+              '--lower-limit', '0',
+              'DEF:downloads=downloads.rrd:downloads:AVERAGE',
+              'AREA:downloads#990033:Downloads')
+
+ info = rrdtool.info('downloads.rrd')
+ print info['last_update']
+ print info['ds']['downloads']['minimal_heartbeat']
+
+=head1 SEE ALSO
+
+rrdcreate, rrdupdate, rrdgraph, rrddump, rrdfetch, rrdtune, rrdlast,
+rrdxport, rrdinfo
+
+=head1 AUTHOR
+
+Hye-Shik Chang E<lt>perky@i18n.orgE<gt>
+
+Alan Milligan E<lt>alan.milligan@last-bastion.netE<gt>
+