Connecting to an Instance Using Python
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()
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()
- 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
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot