Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: jstirnaman/influxdb-python
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: influxdata/influxdb-python
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Able to merge. These branches can be automatically merged.
  • 1 commit
  • 8 files changed
  • 1 contributor

Commits on Oct 29, 2024

  1. Update docs (influxdata#929)

    * chore(docs): Update version advice and tox build requirements:
    
    - Updates the version advice and removes the succession statement to be consistent with the OSS 1.11 release.
    - Adds explicit relations to v2 and v3.
    - Removes redundancies.
    - Fixes formatting errors reported by the linter.
    - Updates dependencies for docs build.
    
    * fix(docs): mention 1.x compat endpoints in 2.x
    jstirnaman authored Oct 29, 2024
    Copy the full SHA
    bbe80ed View commit details
Showing with 65 additions and 47 deletions.
  1. +43 −35 README.rst
  2. +2 −1 docs/source/conf.py
  3. +1 −1 docs/source/examples.rst
  4. +4 −3 influxdb/client.py
  5. +3 −0 pyproject.toml
  6. +2 −2 requirements.txt
  7. +5 −0 setup.py
  8. +5 −5 tox.ini
78 changes: 43 additions & 35 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,14 +1,3 @@
The v1 client libraries for InfluxDB were typically developed and maintained by
community members. For InfluxDB 3.0 users, this library is succeeded by the
lightweight `v3 client library <https://github.com/InfluxCommunity/influxdb3-python>`_.
For InfluxDB 2.0 users, look at the `v2 client library
<https://github.com/influxdata/influxdb-client-python>`_.

If there are still users of this v1 client library, and they or somebody else
are willing to keep them updated with security fixes at a minimum please reach
out on the `Community Forums <https://community.influxdata.com/>`_ or
`InfluxData Slack <https://influxdata.com/slack>`_.

InfluxDB-Python
===============

@@ -26,38 +15,45 @@ InfluxDB-Python
:target: https://pypi.python.org/pypi/influxdb
:alt: PyPI Status

InfluxDB-Python is a client for interacting with InfluxDB_.

**Note: This library is for use with InfluxDB 1.x. For connecting to InfluxDB 2.x instances, please use the the** `influxdb-client-python <https://github.com/influxdata/influxdb-client-python>`_ **client.**
.. important::

Development of this library is maintained by:
**This project is no longer in development**

This v1 client library is for interacting with `InfluxDB 1.x <https://docs.influxdata.com/influxdb/v1/>`_ and 1.x-compatible endpoints in `InfluxDB 2.x <https://docs.influxdata.com/influxdb/v2/>`_.
Use it to:

- Write data in line protocol.
- Query data with `InfluxQL <https://docs.influxdata.com/influxdb/v1/query_language/>`_.

+-----------+-------------------------------+
| Github ID | URL |
+===========+===============================+
| @aviau | (https://github.com/aviau) |
+-----------+-------------------------------+
| @xginn8 | (https://github.com/xginn8) |
+-----------+-------------------------------+
| @sebito91 | (https://github.com/sebito91) |
+-----------+-------------------------------+
If you use `InfluxDB 2.x (TSM storage engine) <https://docs.influxdata.com/influxdb/v2/>`_ and `Flux <https://docs.influxdata.com/flux/v0/>`_, see the `v2 client library <https://github.com/influxdata/influxdb-client-python>`_.

If you use `InfluxDB 3.0 <https://www.influxdata.com/get-influxdb/>`_, see the `v3 client library <https://github.com/influxdata/influxdb3-python>`_.

For new projects, consider using InfluxDB 3.0 and v3 client libraries.

Description
===========

InfluxDB-python, the InfluxDB Python Client (1.x), is a client library for interacting with `InfluxDB 1.x <https://docs.influxdata.com/influxdb/v1/>`_ instances.

.. _readme-about:

InfluxDB is an open-source distributed time series database, find more about InfluxDB_ at https://docs.influxdata.com/influxdb/latest
`InfluxDB`_ is the time series platform designed to handle high write and query loads.


.. _installation:

InfluxDB pre v1.1.0 users
-------------------------

This module is tested with InfluxDB versions: v1.2.4, v1.3.9, v1.4.3, v1.5.4, v1.6.4, and 1.7.4.
For InfluxDB pre-v1.1.0 users
-----------------------------

Those users still on InfluxDB v0.8.x users may still use the legacy client by importing ``from influxdb.influxdb08 import InfluxDBClient``.
This module is tested with InfluxDB versions v1.2.4, v1.3.9, v1.4.3, v1.5.4, v1.6.4, and 1.7.4.

Installation
------------
Users on InfluxDB v0.8.x may still use the legacy client by importing ``from influxdb.influxdb08 import InfluxDBClient``.

For InfluxDB v1.1+ users
------------------------

Install, upgrade and uninstall influxdb-python with these commands::

@@ -165,21 +161,33 @@ We are also lurking on the following:
Development
-----------

The v1 client libraries for InfluxDB 1.x were typically developed and maintained by InfluxDB community members. If you are an InfluxDB v1 user interested in maintaining this client library (at a minimum, keeping it updated with security patches) please contact the InfluxDB team at on the `Community Forums <https://community.influxdata.com/>`_ or
`InfluxData Slack <https://influxdata.com/slack>`_.

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

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

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

Maintainers:

+-----------+-------------------------------+
| Github ID | URL |
+===========+===============================+
| @aviau | (https://github.com/aviau) |
+-----------+-------------------------------+
| @xginn8 | (https://github.com/xginn8) |
+-----------+-------------------------------+
| @sebito91 | (https://github.com/sebito91) |
+-----------+-------------------------------+

Source code
-----------

The source code is currently available on Github: https://github.com/influxdata/influxdb-python
The source code for the InfluxDB Python Client (1.x) is currently available on Github: https://github.com/influxdata/influxdb-python


TODO
@@ -188,6 +196,6 @@ TODO
The TODO/Roadmap can be found in Github bug tracker: https://github.com/influxdata/influxdb-python/issues


.. _InfluxDB: https://influxdata.com/time-series-platform/influxdb/
.. _InfluxDB: https://influxdata.com/
.. _Sphinx: http://sphinx.pocoo.org/
.. _Tox: https://tox.readthedocs.org
3 changes: 2 additions & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
@@ -117,7 +117,8 @@

# Add any paths that contain custom themes here, relative to this directory.
#html_theme_path = []
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
# Calling get_html_theme_path is deprecated.
# html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]

# The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation".
2 changes: 1 addition & 1 deletion docs/source/examples.rst
Original file line number Diff line number Diff line change
@@ -33,7 +33,7 @@ Tutorials - UDP
:language: python

Tutorials - Authorization by Token
===============
==================================

.. literalinclude:: ../../examples/tutorial_authorization.py
:language: python
7 changes: 4 additions & 3 deletions influxdb/client.py
Original file line number Diff line number Diff line change
@@ -395,7 +395,7 @@ def write(self, data, params=None, expected_response_code=204,
:param data: the data to be written
:type data: (if protocol is 'json') dict
(if protocol is 'line') sequence of line protocol strings
or single string
or single string
:param params: additional parameters for the request, defaults to None
:type params: dict
:param expected_response_code: the expected response code of the write
@@ -571,8 +571,9 @@ def write_points(self,
:param points: the list of points to be written in the database
:type points: list of dictionaries, each dictionary represents a point
:type points: (if protocol is 'json') list of dicts, where each dict
represents a point.
(if protocol is 'line') sequence of line protocol strings.
represents a point.
(if protocol is 'line') sequence of line protocol strings.
:param time_precision: Either 's', 'm', 'ms' or 'u', defaults to None
:type time_precision: str
:param database: the database to write the points to. Defaults to
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["setuptools>=42", "wheel"]
build-backend = "setuptools.build_meta"
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
python-dateutil>=2.6.0
pytz
pytz>=2016.10
requests>=2.17.0
six>=1.10.0
msgpack
msgpack>=0.5.0
5 changes: 5 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -23,6 +23,11 @@
with open('requirements.txt', 'r') as f:
requires = [x.strip() for x in f if x.strip()]

# Debugging: Print the requires values
print("install_requires values:")
for req in requires:
print(f"- {req}")

with open('test-requirements.txt', 'r') as f:
test_requires = [x.strip() for x in f if x.strip()]

10 changes: 5 additions & 5 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -12,8 +12,8 @@ deps = -r{toxinidir}/requirements.txt
py35: numpy==1.14.6
py36: pandas==0.23.4
py36: numpy==1.15.4
py37: pandas==0.24.2
py37: numpy==1.16.2
py37: pandas>=0.24.2
py37: numpy>=1.16.2
# Only install pandas with non-pypy interpreters
# Testing all combinations would be too expensive
commands = nosetests -v --with-doctest {posargs}
@@ -38,9 +38,9 @@ commands = nosetests -v --with-coverage --cover-html --cover-package=influxdb

[testenv:docs]
deps = -r{toxinidir}/requirements.txt
pandas==0.24.2
numpy==1.16.2
Sphinx==1.8.5
pandas>=0.24.2
numpy>=1.16.2
Sphinx>=1.8.5
sphinx_rtd_theme
commands = sphinx-build -b html docs/source docs/build