]>
Commit | Line | Data |
---|---|---|
225c0910 CJ |
1 | python-rrdtool |
2 | ============== | |
c639f664 | 3 | |
221dc864 | 4 | Python bindings for [RRDtool](http://oss.oetiker.ch/rrdtool) with a native C extension. |
b4570f2a | 5 | |
221dc864 CJ |
6 | Supported Python versions: 2.6+, 3.3+. |
7 | ||
8 | The bindings are based on the code of the original Python 2 bindings for rrdtool by Hye-Shik Chang, which are currently shipped as official bindings with rrdtool. | |
b4570f2a CJ |
9 | |
10 | Installation | |
11 | ------------ | |
12 | ||
221dc864 CJ |
13 | The easy way: |
14 | ||
15 | `# pip install rrdtool` | |
b4570f2a | 16 | |
221dc864 | 17 | Note: This requires rrdtool and it's development files (headers, libraries, dependencies) to be installed. |
b4570f2a | 18 | |
ab889c84 | 19 | In case you'd like to build the module on your own, you can obtain a copy of the repository and run `python setup.py install` in it's destination folder to build the native C extension as well as the RRD module. |
b4570f2a CJ |
20 | |
21 | Usage | |
22 | ----- | |
23 | ||
b4570f2a CJ |
24 | ```python |
25 | import rrdtool | |
26 | ||
27 | # Create Round Robin Database | |
28 | rrdtool.create('test.rrd', '--start', 'now', '--step', '300', 'RRA:AVERAGE:0.5:1:1200', 'DS:temp:GAUGE:600:-273:5000') | |
29 | ||
30 | # Feed updates to the RRD | |
31 | rrdtool.update('test.rrd', 'N:32') | |
32 | ``` | |
33 | ||
ea7bad6d CJ |
34 | Changes |
35 | ------- | |
b4570f2a | 36 | |
b4570f2a | 37 | |
ea7bad6d | 38 | ## 0.1.2 |
b4570f2a | 39 | |
ea7bad6d | 40 | *Released 2015-08-10* |
b4570f2a | 41 | |
221dc864 CJ |
42 | * Added xport command |
43 | * Added lastupdate command | |
44 | * Removed high-level interface (RRDtool module) | |
ea7bad6d CJ |
45 | * Improved documentation of functions |
46 | * Code cleanup by using convenience macros | |
221dc864 CJ |
47 | * On Python 2.x, str objects are returned instead of unicode objects |
48 | * Merged some changes from upstream | |
49 | * License changed to LGPL 2.1 to match upstream licensing | |
225c0910 CJ |
50 | |
51 | ## 0.1.1 | |
52 | ||
53 | *Released 2013-12-19* | |
54 | ||
55 | * Added support for Python 2.7 (other 2.x versions might also work, but its not tested) | |
56 | * Added dump command | |
57 | * Fixed some issues regarding generating graphs with `graphv` on Python 3.3 | |
58 | ||
59 | *Please note:* The `graph` method in the object-oriented RRD class will now return a dict by default (as returned by graphv). Only if the `output_file` parameter is None, the actual graph image bytes are returned. Python 3.3 will return a bytes object whereas Python 2.x will return a str object. | |
60 | ||
61 | ## 0.1.0 | |
62 | ||
63 | *Released 2012-09-17* | |
64 | ||
65 | * Initial release. | |
66 | * Support for Python 3.x added | |
67 | * Updated documentation strings (`__doc__`) for each of the rrdtool functions | |
68 | ||
b4570f2a CJ |
69 | Author |
70 | ------ | |
71 | ||
72 | Christian Jurk <commx@commx.ws> | |
73 | ||
74 | This binding was created because I am currently porting some existing Python 2 code to Python 3 and try to help the community by contributing a updated binding extension. Hope someone can benefit from it. | |
75 | ||
ab889c84 | 76 | If you encounter any bugs (which I expected at time of writing this), please submit them in the issue tracker here on the project page on Github. Thank you. |