Sans-IO#

New in version 1.7.0

Caution

🚧 IN CONSTRUCTION 🚧

This doc is incomplete, check back soon!

In the process of introducing async querying to Subgrounds, a large amount of refactoring was needed to reduce code duplication. We decided to embrace the technique of sans-io, a methodology to decouple the libraries' business logic from "IO" logic (making and sending requests).

The result of this work has led us to the subgrounds.client subpackage and the SubgroundsBase class as an access point to all the logic encapsulated by subgrounds. We've implemented two clients as apart of the subgrounds package: Subgrounds and AsyncSubgrounds — leveraging httpx to actually make requests.

Alternatively, you can subclass SubgroundsBase (or even Subgrounds / AsyncSubgrounds) and implement your own choice of requests library (requests, aiohttp, etc.) with ~10 LOCSubgrounds is completely unentangled with the IO.