Questions tagged [aioinflux]

Aioinflux is an Asynchronous Python client for InfluxDB. Built on top of aiohttp and asyncio offers an alternative to the official InfluxDB Python client. Use with the [python] and/or [influxdb] tags

5 questions
1
vote
1 answer

Why does calling `write` in aioinflux with an iterable of a user-defined dataclass seem to only insert the last item?

I've been trying to insert the data contained in a list, inside a running influxdb server. The list contains items of the following type CoordInfluxData: from aioinflux.serialization.usertype import FLOAT, INT, TIMEINT, lineprotocol from dataclasses…
1
vote
2 answers

How to type hint object as `PointType` in Python aioinflux?

I have a dataclass similar to the one defined in the docs : from dataclasses import dataclass @lineprotocol @dataclass class Trade: timestamp: TIMEINT instrument: TAGENUM source: TAG side: TAG price: FLOAT size: INT …
KZiovas
  • 3,491
  • 3
  • 26
  • 47
0
votes
1 answer

TypeError when writing data to Influx with None values using Python's aioinflux user defined schema

So I have a schema that I defined and use with aioinflux library to write data from Python to InfluxDB: from datetime import datetime from aioinflux import lineprotocol, TIMEDT, TAG, FLOAT, MEASUREMENT, INT from dataclasses import dataclass from…
KZiovas
  • 3,491
  • 3
  • 26
  • 47
0
votes
1 answer

Python aioinflux `serialization.usertype.SchemaError: Can't have more than one timestamp-type attribute`, how to avoid it?

I have this dataclass with a lineprotocol schema like this: from datetime import date, datetime from aioinflux import lineprotocol, TIMEDT, TAG, FLOAT, MEASUREMENT, STR, INT from dataclasses import dataclass from shared import…
KZiovas
  • 3,491
  • 3
  • 26
  • 47
0
votes
1 answer

How to add different tags to all elements of a list of user-defined dataclasses, when attempting to insert the list in influxdb using one call

I'm trying to insert an whole list of user-defined dataclasses in my influxdb server, and provide different tags to each, while also using a single write call. I'm using aioinflux. Is this possible? So far, I've been looking at the…