Community Python client for InfluxDB IOx (CLI)
Project description
About
This is a community repository of Python code for InfluxDB with IOx. While this code is built on officially supported APIs, the library and CLI here are not officially support by Influx Data.
When installed, you have access to 2 pieces of functionality:
- A CLI for reading and writing data to InfluxDB with IOx.
- A client library for reading and writing data to InfluxDB with IOx.
Install
To install only the client:
python3 -m pip install pyinflux3
To install the client and CLI:
sudo python3 -m pip install "pyinflux3[cli]"
*Note: Use sudo if you would like to directly install the client onto your path. Otherwise use the --user
flag.
Add a Config
You can drop a config file called config.json in the directory where you are running the influx3 command:
{
{
"my-config": {
"namespace": "your-namespace",
"host": "your-host",
"token": "your-token",
"org": "your-org-id",
"active": true
}
}
}
Or you can use the config command to create or modify a config:
% influx3 config --name="my-config" --namespace="<database or bucket name>" --host="us-east-1-1.aws.cloud2.influxdata.com" --token="<your token>" --org="<your org ID>"
If you are running against InfluxDB Cloud, then use the bucket name for the namespace in you configuration.
Run as a Command
% influx3 sql "select * from anomalies"
% influx3 write testmes f=7
Query and Write Interactively
% influx3
Welcome to my IOx CLI.
(>) sql
(sql >) select * from anomalies
check id observed time type user_id value
0 1 None NaN 2023-02-03 20:56:57.513279776 error 1 400.0
1 1 None NaN 2023-02-03 17:52:54.328785835 latency 1 900.0
(>) write
testmes f=5 boring-observability
Client library
This project also includes a new client library that strives for utter simplicity. It includes 3 functions, a constuctor, write(), and read().
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pyinflux3-cli-0.8.1.tar.gz
.
File metadata
- Download URL: pyinflux3-cli-0.8.1.tar.gz
- Upload date:
- Size: 4.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0c5802ae98341a729dc5806e5450ccc028e7d7440050c6f5452a2cba6955c5a0 |
|
MD5 | e76a7fa3179ff5a84916e5ee4029cd99 |
|
BLAKE2b-256 | 59767d4cdcce96b31aa635b704c86a917467d9e07cb5b39f38175c6f685a2802 |
File details
Details for the file pyinflux3_cli-0.8.1-py3-none-any.whl
.
File metadata
- Download URL: pyinflux3_cli-0.8.1-py3-none-any.whl
- Upload date:
- Size: 6.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 606a2f4fb42ce01b91ce67c743c926ffa096c2f29d9441f3f8e46955493ae6ed |
|
MD5 | 463fbe68814ee0a9653f7873dd57480a |
|
BLAKE2b-256 | a918425edac5c3d8a194f64e3ab94619af6f0a80e1a92c17c8f4ffed6d4452c8 |