julian_knight
09/19/2022, 10:42 PMOpenApiStream
class. It doesn't generate streams from a swagger spec, but it does use the base url and response schema from it, which still saves a lot of time over defining schemas by hand: https://github.com/rabidaudio/tap-lichess/blob/main/tap_lichess/openapi.py
• If anyone ever needs to do streaming requests, there's an example in GamesStream. Basically enable stream mode in the session with requests_session.stream = True
and then override parse_response
• Posting a request body that isn't json wasn't hard but I did have to re-implement prepare_request
. RESTStream
seems to assume all bodies are json (which seems pretty reasonable to me)