If any request returns `{'success': False}` or throws an exception, `Api.Execute` will not exit the execution, will log and return the result. This change will enable re-try logic.
- Refactor to simplify `quantconnect.api.Api` class. Adds `Execute` method that accepts a bolean to distinguish a `POST` from a `GET` request.
In the previous version, some methods were using the `params` argument instead of `data` in the `POST` case which threw an exception for big json objects.
- Adds option to save logs and backtest report to disk.
- Adds `Result` class to optionally convert the json objects into `pandas.DataFrame` when getting backtest or live results
- Subversion bump
Passing chunk_size=None to iter_content() works fine for chunk-encoded
responses, but still leaves us buffering the entire response when the
server just specifies a Content-Length.
Now, stream the response 256k at a time.
Why 256k? It's large enough that you won't be in a tight loop doing tiny
reads, but small enough that it shouldn't be any great memory concern.
If anyone finds that it's problematic, they can always monkey-patch
quantconnect.api.DOWNLOAD_CHUNK_SIZE.
Previously, the entire response would be read and buffered in memory
before any of it was written to disk.
Now, stream the response and write down data as it's received.