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.3.tar.gz
(2.8 kB
view details)
File details
Details for the file influxdb-async-1.0.3.tar.gz
.
File metadata
- Download URL: influxdb-async-1.0.3.tar.gz
- Upload date:
- Size: 2.8 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 | eda8a4f2e24cb36e0ab928063f3bcde52fb0bd19fc08f7cc2881b8410a64c04e |
|
MD5 | 9e3674ad0989a288a5c0c2113ffd75a8 |
|
BLAKE2b-256 | e3cddcf834b572225255019eb7aa6c5e55b04003cd798ab22586121043f2e346 |