InfluxDB with a Python client

In this example, we will set up a python environment and run InfluxDB with a python client.

  1. Install Python.

Assume that you have Python installed. Python 3 is installed by default on modern versions of Ubuntu, type python3 -V to verify. If not, run the following command to install Python 3:

sudo apt-get install python3
  1. Install InfluxDB-Python.

Install InfluxDB-python by entering the following command:

$ pip install InfluxDB

On Debian/Ubuntu, you can install it with the following command:

sudo apt-get install python-InfluxDB
  1. Write a Python program.

Type python on the Terminal. It will load the Python shell. Enter the following Python codes line by line. It will print out two records, which are written to ...

Get Seven NoSQL Databases in a Week now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.