Esta página aún no está disponible en su idioma local. Estamos trabajando arduamente para agregar más versiones de idiomas. Gracias por tu apoyo.

Connecting to an Instance Using Python

Updated on 2023-11-21 GMT+08:00

This section describes how to connect to a GeminiDB Influx instance using the Python programming language.

Prerequisites

The Python client of InfluxDB has been installed.

Example Code for Accessing an Instance Using a Non-SSL Connection

from influxdb import InfluxDBClient
 
client = InfluxDBClient(host=IP, port=****, username=****, password=****, ssl=False) 
client.get_list_database()
NOTE:

Replace host, port, username, and password with the actual values.

Example Code for Accessing an Instance Using an SSL Connection

from influxdb import InfluxDBClient

client = InfluxDBClient(host=IP, port=****, username=****, password=****, ssl=True) 
client.get_list_database()
NOTE:
  • Replace host, port, username, and password with the actual values.
  • The value of ssl must be True.
  • If SSL is not set or is set to False, the following error information is displayed:

    InfluxDBClientError: 400: Client sent an HTTP request to an HTTPS server.

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback