Skip to content
This repository was archived by the owner on Oct 11, 2024. It is now read-only.

Repository files navigation

logger-utility

Use esse pacote para lidar com diversas operações comuns em logs.

install

pdm add logger-utility

usage

WritePoint

write(bucket, org, write_precision)

Invoca a função write da WriteAPI ou WriteApiAsync passando o a si mesmo como record.

from influxdb_client.client.influxdb_client_async import InfluxDBClientAsync

from logger_utility import WritePoint


client = InfluxDBClientAsync(
    url="http://127.0.0.1:8086", token="TOKEN", org="ORG"
)

write_api = client.write_api()

(
    await WritePoint("test", write_api)
    .tag("foo", 1)
    .field("bar", 2)
    .time(datetime.utcnow())
    .write(bucket="test")
)

await client.close()

About

No description or website provided.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages