anomaly / gallagher

The missing toolkit for extending Gallagher Command Centre, featuring a CLI, SQL interface, TUI and a Python idiomatic SDK
https://anomaly.github.io/gallagher/
MIT License
11 stars 2 forks source link

Consider moving to `asyncio` before the library gets too large #18

Closed devraj closed 8 months ago

devraj commented 9 months ago

We're getting to a stage where the library design and patterns are maturing. Tests are running consistently and passing as expected.

It would thus be time to full flesh out the entire library before we move into some enterprise features and use this in integrations and products.

Most of Anomaly's projects have moved to using asyncio and it would thus be unwise to not make this library have asyncio support. We would have to consider:

devraj commented 9 months ago

See also streaming responses for long poll calls to the API.

devraj commented 8 months ago

This in principle is complete, however see commit 620b652 as typer officially does not support async yet. There's an ongoing discussion https://github.com/tiangolo/typer/issues/88 and the Roadmap https://github.com/tiangolo/typer/issues/678 discusses this as well.

For now we have a wrapper class adapted from @gilcu2's comment on the thread.

This issue is being closed for now, we should refactor the cli implementation as typer introduces support for concurrency.