1
+ ===============
1
2
influxdb-python
2
3
===============
3
4
@@ -7,18 +8,88 @@ influxdb-python
7
8
[ ![ Supported Python versions] ( https://pypip.in/py_versions/influxdb/badge.svg )] ( https://pypi.python.org/pypi/influxdb/ )
8
9
[ ![ License] ( https://pypip.in/license/influxdb/badge.svg )] ( https://pypi.python.org/pypi/influxdb/ )
9
10
10
- Python client for InfluxDB
11
+ About
12
+ =====
11
13
12
- For developers
13
- --------------
14
+ InfluxDB-Python is a client for interacting with [ InfluxDB] ( http://influxdb.com/ ) .
14
15
15
- ### Uploading
16
+ InfluxDB is an open-source distributed time series database, find more about at http://influxdb.com/
16
17
17
- ```
18
- $ python setup.py sdist upload
19
- ```
20
18
21
- ### Testing
19
+ Installation
20
+ ============
21
+
22
+ Install, upgrade and uninstall InfluxDB-Python with these commands:
23
+
24
+ ````
25
+ $ pip install influxdb
26
+ $ pip install --upgrade influxdb
27
+ $ pip uninstall influxdb
28
+ ````
29
+
30
+
31
+ Dependencies
32
+ ============
33
+
34
+ The InfluxDB-Python distribution is supported and tested on Python 2.7 and Python 3.3.
35
+ Requests
36
+
37
+ Additional dependencies are:
38
+
39
+ - Sphinx: to generate documentation
40
+ - Nose & Mock: to auto-discover & mock tests
41
+
42
+
43
+ Documentation
44
+ =============
45
+
46
+ InfluxDB-Python documentation is available at [ ADD_LINK] ( https://readthedocs.org/ )
47
+
48
+ You will need [ Sphinx] ( http://sphinx.pocoo.org/ ) installed to generate the
49
+ documentation.
50
+
51
+ The documentation can be generated by running:
52
+
53
+ ````
54
+ python setup.py doc
55
+ ````
56
+
57
+ Generated documentation can be found in the * doc/build/html/* directory.
58
+
59
+
60
+ Examples
61
+ ========
62
+
63
+ Here's a basic example (for more see the examples directory):
64
+
65
+ ````
66
+ $ python
67
+
68
+ >>> from influxdb import InfluxDBClient
69
+
70
+ >>> json_body = [{
71
+ "points": [
72
+ ["1", 1, 1.0],
73
+ ["2", 2, 2.0]
74
+ ],
75
+ "name": "foo",
76
+ "columns": ["column_one", "column_two", "column_three"]
77
+ }]
78
+
79
+ >>> client = InfluxDBClient('localhost', 8086, 'root', 'root', 'example')
80
+
81
+ >>> client.create_database('example')
82
+
83
+ >>> client.write_points(json_body)
84
+
85
+ >>> result = client.query('select column_one from foo;')
86
+
87
+ >>> print("Result: {0}".format(result))
88
+ ````
89
+
90
+
91
+ Testing
92
+ =======
22
93
23
94
Make sure you have tox by running the following:
24
95
@@ -37,3 +108,16 @@ If you don't have all Python version listed in tox.ini, then
37
108
````
38
109
$ tox -e py27
39
110
````
111
+
112
+
113
+ Support
114
+ =======
115
+
116
+ For issues with, questions about, or feedback for InfluxDB, please look into
117
+ our community page: http://influxdb.com/community/ .
118
+
119
+
120
+ Source code
121
+ ===========
122
+
123
+ The source code is currently available on [ https://github.com/influxdb/influxdb-python ] ( https://github.com/influxdb/influxdb-python ) .
0 commit comments