Skip to content

Commit 9909a9f

Browse files
authored
Merge pull request aristanetworks#1 from aristanetworks/version-upgrade
Version upgrade to v5.0.0 from upstream.
2 parents 36794f3 + 991cd89 commit 9909a9f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+2655
-1473
lines changed

.travis.yml

Lines changed: 40 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,44 @@
11
language: python
2-
env:
3-
- TOX_ENV=py27
4-
- TOX_ENV=py32
5-
- TOX_ENV=py33
6-
- TOX_ENV=py34
7-
- TOX_ENV=pypy
8-
- TOX_ENV=pypy3
9-
- TOX_ENV=docs
10-
- TOX_ENV=flake8
11-
- TOX_ENV=coverage
2+
3+
addons:
4+
apt:
5+
packages:
6+
- wget
7+
8+
matrix:
9+
allow_failures:
10+
- python: 3.4
11+
env: TOX_ENV=docs
12+
include:
13+
- python: 2.7
14+
env: TOX_ENV=py27
15+
- python: 2.7
16+
env: TOX_ENV=pep257
17+
- python: pypy-5.3.1
18+
env: TOX_ENV=pypy
19+
- python: 3.4
20+
env: TOX_ENV=py34
21+
- python: 3.5
22+
env: TOX_ENV=py35
23+
- python: 3.6
24+
env: TOX_ENV=py36
25+
- python: 3.6
26+
env: TOX_ENV=docs
27+
- python: 3.6
28+
env: TOX_ENV=flake8
29+
- python: 3.6
30+
env: TOX_ENV=coverage
31+
1232
install:
1333
- pip install tox
34+
- pip install setuptools==20.6.6
1435
- pip install coveralls
1536
- mkdir influxdb_install
16-
- wget https://s3.amazonaws.com/influxdb/influxdb_0.9.4.1_amd64.deb
17-
- dpkg -x influxdb_*_amd64.deb influxdb_install
37+
- wget https://dl.influxdata.com/influxdb/releases/influxdb_1.2.4_amd64.deb
38+
- dpkg -x influxdb*.deb influxdb_install
1839
script:
19-
- export INFLUXDB_PYTHON_INFLUXD_PATH=$(pwd)/influxdb_install/opt/influxdb/versions/0.9.4.1/influxd
20-
- travis_wait 30 tox -e $TOX_ENV
40+
- export INFLUXDB_PYTHON_INFLUXD_PATH=$(pwd)/influxdb_install/usr/bin/influxd
41+
- tox -e $TOX_ENV
2142
after_success:
2243
- if [ "$TOX_ENV" == "coverage" ] ; then coveralls; fi
2344
notifications:
@@ -26,8 +47,8 @@ notifications:
2647
sudo: false
2748

2849
# Travis caching
29-
cache:
30-
directories:
31-
- $HOME/.cache/pip
32-
before_cache:
33-
- rm -f $HOME/.cache/pip/log/debug.log
50+
cache: false
51+
# directories:
52+
# - $HOME/.cache/pip
53+
#before_cache:
54+
# - rm -f $HOME/.cache/pip/log/debug.log

MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ include requirements.txt
22
include test-requirements.txt
33
include dev-requirements.txt
44
include LICENSE
5+
include README.rst

README.rst

Lines changed: 51 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,50 @@
1+
InfluxDB-Python
2+
===============
13

2-
3-
InfluxDB-Python is a client for interacting with InfluxDB_.
4-
5-
.. image:: https://travis-ci.org/influxdb/influxdb-python.svg?branch=master
6-
:target: https://travis-ci.org/influxdb/influxdb-python
4+
.. image:: https://travis-ci.org/influxdata/influxdb-python.svg?branch=master
5+
:target: https://travis-ci.org/influxdata/influxdb-python
76

87
.. image:: https://readthedocs.org/projects/influxdb-python/badge/?version=latest&style
98
:target: http://influxdb-python.readthedocs.org/
109
:alt: Documentation Status
1110

12-
.. image:: https://img.shields.io/coveralls/influxdb/influxdb-python.svg
13-
:target: https://coveralls.io/r/influxdb/influxdb-python
11+
.. image:: https://img.shields.io/coveralls/influxdata/influxdb-python.svg
12+
:target: https://coveralls.io/r/influxdata/influxdb-python
1413
:alt: Coverage
1514

16-
.. image:: https://pypip.in/download/influxdb/badge.svg
17-
:target: https://pypi.python.org/pypi//influxdb/
18-
:alt: Downloads
1915

20-
.. image:: https://pypip.in/version/influxdb/badge.svg
21-
:target: https://pypi.python.org/pypi/influxdb/
22-
:alt: Latest Version
2316

24-
.. image:: https://pypip.in/py_versions/influxdb/badge.svg
25-
:target: https://pypi.python.org/pypi/influxdb/
26-
:alt: Supported Python versions
17+
InfluxDB-Python is a client for interacting with InfluxDB_. Development of this library is maintained by
2718

28-
.. image:: https://pypip.in/license/influxdb/badge.svg
29-
:target: https://pypi.python.org/pypi/influxdb/
30-
:alt: License
19+
+-----------+-------------------------------+
20+
| Github ID | URL |
21+
+===========+===============================+
22+
| @aviau | (https://github.com/aviau) |
23+
+-----------+-------------------------------+
24+
| @xginn8 | (https://github.com/xginn8) |
25+
+-----------+-------------------------------+
26+
| @sebito91 | (https://github.com/sebito91) |
27+
+-----------+-------------------------------+
3128

3229
.. _readme-about:
3330

34-
InfluxDB is an open-source distributed time series database, find more about InfluxDB_ at http://influxdb.com/
31+
InfluxDB is an open-source distributed time series database, find more about InfluxDB_ at https://docs.influxdata.com/influxdb/latest
3532

3633

3734
.. _installation:
3835

39-
InfluxDB v0.8.X users
40-
=====================
36+
InfluxDB pre v1.1.0 users
37+
-------------------------
4138

42-
InfluxDB 0.9 was released and it is the new recommended version. However, InfluxDB 0.8.x users may still use the legacy client by using ``from influxdb.influxdb08 import InfluxDBClient`` instead.
39+
This module is tested with InfluxDB v1.2.4, our recommended version. Though there have been v1.3 (initial TSI branch) and v1.4 releases these are not
40+
yet supported.
41+
42+
Those users still on InfluxDB v0.8.x users may still use the legacy client by importing ``from influxdb.influxdb08 import InfluxDBClient``.
4343

4444
Installation
45-
============
45+
------------
4646

47-
Install, upgrade and uninstall InfluxDB-Python with these commands::
47+
Install, upgrade and uninstall influxdb-python with these commands::
4848

4949
$ pip install influxdb
5050
$ pip install --upgrade influxdb
@@ -55,9 +55,11 @@ On Debian/Ubuntu, you can install it with this command::
5555
$ sudo apt-get install python-influxdb
5656

5757
Dependencies
58-
============
58+
------------
59+
60+
The influxdb-python distribution is supported and tested on Python 2.7, 3.3, 3.4, 3.5, 3.6, PyPy and PyPy3.
5961

60-
The InfluxDB-Python distribution is supported and tested on Python 2.7, 3.2, 3.3, 3.4, PyPy and PyPy3.
62+
**Note:** Python 3.2 is currently untested. See ``.travis.yml``.
6163

6264
Main dependency is:
6365

@@ -73,9 +75,9 @@ Additional dependencies are:
7375

7476

7577
Documentation
76-
=============
78+
-------------
7779

78-
InfluxDB-Python documentation is available at http://influxdb-python.readthedocs.org
80+
Documentation is available at https://influxdb-python.readthedocs.io/en/latest/.
7981

8082
You will need Sphinx_ installed to generate the documentation.
8183

@@ -88,7 +90,7 @@ Generated documentation can be found in the *docs/build/html/* directory.
8890

8991

9092
Examples
91-
========
93+
--------
9294

9395
Here's a basic example (for more see the examples directory)::
9496

@@ -120,23 +122,9 @@ Here's a basic example (for more see the examples directory)::
120122

121123
>>> print("Result: {0}".format(result))
122124

123-
If you want to connect to a cluster, you could initialize a ``InfluxDBClusterClient``::
124-
125-
$ python
126-
127-
>>> from influxdb import InfluxDBClusterClient
128-
129-
>>> cc = InfluxDBClusterClient(hosts = [('192.168.0.1', 8086),
130-
('192.168.0.2', 8086),
131-
('192.168.0.3', 8086)],
132-
username='root',
133-
password='root',
134-
database='example')
135-
136-
``InfluxDBClusterClient`` has the same methods as ``InfluxDBClient``, it basically is a proxy to multiple InfluxDBClients.
137125

138126
Testing
139-
=======
127+
-------
140128

141129
Make sure you have tox by running the following::
142130

@@ -148,34 +136,43 @@ To test influxdb-python with multiple version of Python, you can use Tox_::
148136

149137

150138
Support
151-
=======
139+
-------
152140

153141
For issues with, questions about, or feedback for InfluxDB_, please look into
154142
our community page: http://influxdb.com/community/.
155143

144+
We are also lurking on the following:
145+
146+
- #influxdb on irc.freenode.net
147+
- #influxdb on gophers.slack.com
148+
156149

157150
Development
158-
===========
151+
-----------
159152

160153
All development is done on Github_. Use Issues_ to report
161154
problems or submit contributions.
162155

163156
.. _Github: https://github.com/influxdb/influxdb-python/
164157
.. _Issues: https://github.com/influxdb/influxdb-python/issues
165158

159+
Please note that we WILL get to your questions/issues/concerns as quickly as possible. We maintain many
160+
software repositories and sometimes things may get pushed to the backburner. Please don't take offense,
161+
we will do our best to reply as soon as possible!
166162

167-
TODO
168-
====
169163

170-
The TODO/Roadmap can be found in Github bug tracker: https://github.com/influxdb/influxdb-python/issues
164+
Source code
165+
-----------
171166

167+
The source code is currently available on Github: https://github.com/influxdata/influxdb-python
172168

173-
Source code
174-
===========
175169

176-
The source code is currently available on Github: https://github.com/influxdb/influxdb-python
170+
TODO
171+
----
172+
173+
The TODO/Roadmap can be found in Github bug tracker: https://github.com/influxdata/influxdb-python/issues
177174

178175

179-
.. _InfluxDB: http://influxdb.com/
176+
.. _InfluxDB: https://influxdata.com/time-series-platform/influxdb/
180177
.. _Sphinx: http://sphinx.pocoo.org/
181178
.. _Tox: https://tox.readthedocs.org

dev-requirements.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
requests
1+
requests>=2.17.0
22
nose
33
mock
4-
pandas
5-
Sphinx==1.2.3
4+
pandas==0.20.1
5+
Sphinx==1.5.5
66
sphinx_rtd_theme
77
wheel
88
twine

docs/source/api-documentation.rst

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -45,16 +45,6 @@ These clients are initiated in the same way as the
4545
:members:
4646
:undoc-members:
4747

48-
------------------------------
49-
:class:`InfluxDBClusterClient`
50-
------------------------------
51-
52-
53-
.. currentmodule:: influxdb.InfluxDBClusterClient
54-
.. autoclass:: influxdb.InfluxDBClusterClient
55-
:members:
56-
:undoc-members:
57-
5848
------------------------
5949
:class:`DataFrameClient`
6050
------------------------

docs/source/conf.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# -*- coding: utf-8 -*-
22
#
3+
"""InfluxDB documentation build configuration file."""
4+
35
# InfluxDB documentation build configuration file, created by
46
# sphinx-quickstart on Thu Oct 16 00:33:06 2014.
57
#

docs/source/resultset.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Using ``rs.get_points()`` will return a generator for all the points in the Resu
1818
Filtering by measurement
1919
------------------------
2020

21-
Using ``rs.get_points('cpu')`` will return a generator for all the points that are in a serie with measurement name ``cpu``, no matter the tags.
21+
Using ``rs.get_points('cpu')`` will return a generator for all the points that are in a series with measurement name ``cpu``, no matter the tags.
2222
::
2323

2424
rs = cli.query("SELECT * from cpu")
@@ -36,7 +36,7 @@ Using ``rs.get_points(tags={'host_name': 'influxdb.com'})`` will return a genera
3636
Filtering by measurement and tags
3737
---------------------------------
3838

39-
Using measurement name and tags will return a generator for all the points that are in a serie with the specified measurement name AND whose tags match the given tags.
39+
Using measurement name and tags will return a generator for all the points that are in a series with the specified measurement name AND whose tags match the given tags.
4040
::
4141

4242
rs = cli.query("SELECT * from cpu")

examples/tutorial.py

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
1+
# -*- coding: utf-8 -*-
2+
"""Tutorial on using the InfluxDB client."""
3+
14
import argparse
25

36
from influxdb import InfluxDBClient
47

58

69
def main(host='localhost', port=8086):
10+
"""Instantiate a connection to the InfluxDB."""
711
user = 'root'
812
password = 'root'
913
dbname = 'example'
@@ -19,7 +23,10 @@ def main(host='localhost', port=8086):
1923
},
2024
"time": "2009-11-10T23:00:00Z",
2125
"fields": {
22-
"value": 0.64
26+
"Float_value": 0.64,
27+
"Int_value": 3,
28+
"String_value": "Text",
29+
"Bool_value": True
2330
}
2431
}
2532
]
@@ -38,7 +45,7 @@ def main(host='localhost', port=8086):
3845
print("Write points: {0}".format(json_body))
3946
client.write_points(json_body)
4047

41-
print("Queying data: " + query)
48+
print("Querying data: " + query)
4249
result = client.query(query)
4350

4451
print("Result: {0}".format(result))
@@ -51,9 +58,11 @@ def main(host='localhost', port=8086):
5158

5259

5360
def parse_args():
61+
"""Parse the args."""
5462
parser = argparse.ArgumentParser(
5563
description='example code to play with InfluxDB')
56-
parser.add_argument('--host', type=str, required=False, default='localhost',
64+
parser.add_argument('--host', type=str, required=False,
65+
default='localhost',
5766
help='hostname of InfluxDB http API')
5867
parser.add_argument('--port', type=int, required=False, default=8086,
5968
help='port of InfluxDB http API')

0 commit comments

Comments
 (0)