7 ms·
> It just litters perfectly reasonable python code with async/await Yeah. As an API consumer I would not expect a PDF API do IO, hence be async. Have the libra
by diarrhea 2y ago
> It just litters perfectly reasonable python code with async/await
Yeah. As an API consumer I would not expect a PDF API do IO, hence be async. Have the library be sans-io, the interfaces sync and callers from async code handle IO on their end, offloading to IO threads.
Async is also referred to as “best practice”, but it’s just a tool, for specific use cases. And I say that as an “async fan”!
That said, perhaps it’s easier nowadays to just do async by default, as you say. The real world is async anyway, so why not program closer to that reality.
- nhirschfeld 2y agothats why Kreuzberg also exposes a sync API for you to consume.
- PDFBolt 2y agoAsync is great when you truly need it, but it can overcomplicate things when misused. Having both sync and async options, seems like the best approach. Lets devs choose based on their needs rather than forcing one paradigm.