async multi fields to influxdb
Project description
``(一):安装``
从 PYPI 安装
pip install influxdb-async
从 Github 安装
pip isntall git+https://github.com/yinhuanyi/influxdb-async.git
``(二):使用方法``
from influxdb_async import InfluxdbMultiFieldsAsync host = '100.122.0.2' port = 8086 database = 'db1' measurement = 'measurement1' tags = {"host": "server1", "env": "env1"} fields_list = [{"value": 1}, {"value": 2}, {"value": 3}] username = 'username' password = 'password' # 如果influxdb没有用户名和密码 with InfluxdbMultiFieldsAsync(host, port, database, measurement, tags, fields_list) as influxdb: influxdb.start() # 如果influxdb有用户名和密码 with InfluxdbMultiFieldsAsync(host, port, database, measurement, tags, fields_list, username=username, password=password) as influxdb: influxdb.start()
``(三):influxdb显示效果``
> use db1; Using database db1 > select * from measurement1; name: measurement1 time env host value ---- --- ---- ----- 1591946958016786087 env1 server1 1 1591946958229993773 env1 server1 2 1591946958438736358 env1 server1 3
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
influxdb-async-1.0.1.tar.gz
(2.6 kB
view details)
Built Distribution
File details
Details for the file influxdb-async-1.0.1.tar.gz
.
File metadata
- Download URL: influxdb-async-1.0.1.tar.gz
- Upload date:
- Size: 2.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/28.8.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.6.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bdcdbd522c391464ea2c8539782a997510e344cd0009546696e4d306c82310c2 |
|
MD5 | 1f0c7c3da32a4c7e374077d0b5fba84d |
|
BLAKE2b-256 | 6dcbbf488373541f5bbf12d55ec374a2ce50ff0fc2f88d476d49c6a1a6480e3a |
File details
Details for the file influxdb_async-1.0.1-py3-none-any.whl
.
File metadata
- Download URL: influxdb_async-1.0.1-py3-none-any.whl
- Upload date:
- Size: 3.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/28.8.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.6.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | afa9add5fdb38d6de7ead55fafe0d8a9822e1f8f9c1fe95ce84fe1d01e764637 |
|
MD5 | 6a010779238223f95dc1417031018a2a |
|
BLAKE2b-256 | 01167c0daff028d748d8428087d3339929fb581228f0892a054d9348df6d0727 |