open-aviation / pyopensky

The Python interface for OpenSky database
https://open-aviation.github.io/pyopensky/
GNU Lesser General Public License v3.0
53 stars 11 forks source link

Suppressing output #98

Closed aevela closed 3 months ago

aevela commented 3 months ago

Is there a way to suppress the output following a trino.query? (example below)

FINISHED: : 94.7% [00:00, 471%/s] DOWNLOAD: 62.0lines [00:00, 74.9klines/s]

xoolive commented 3 months ago

First, the guilty lines are https://github.com/open-aviation/pyopensky/blob/c004ea8be662cca2661f6330391264f2eb472cc5/src/pyopensky/trino.py#L175 and https://github.com/open-aviation/pyopensky/blob/c004ea8be662cca2661f6330391264f2eb472cc5/src/pyopensky/trino.py#L192

It is possible to write some code to silence them, but I haven't. IMHO, the only use case where this would make sense is if you write many small queries (which is not really recommended for now, I should also investigate a way to run some async queries).

So for now, no plan to edit these lines in this workflow. Of course, you are free to edit your own fork.

aevela commented 3 months ago

Ah yes, thank you Xavier -- tqdm, not sure how I missed that. Yes, it's probably a non-standard query compared to most; query executes conditional random sampling of flights on hourly basis over globe instead of grabbing all flights in specific geographic region (or arriving/departing specific airport) for specific time range.

Async would be great.

xoolive commented 3 months ago

Well... will work on async at some point for sure, just too much on my plate for now