SDK for integrating with the Smartling API. The Smartling API allows developers to upload language specific resource files and download the translations of those files for easy integration within their application.
That leads to unexpected results for the users (myself included):
In [18]: resp, status = jobs_api.getJobDetails('foo')
Non 200 response:404 RequestId:Unknown URL:https://api.smartling.com/jobs-api/v3/projects/3bea86d16/jobs/foo response:b'{"response":{"code":"NOT_FOUND_ERROR","errors":[{"key":"not.found","message":"Translation job is not found","details":null}]}}'
Note that the error is printed to the standard output. This is unexpected because in the app I'm integrating Smartling into, I would check for status and then log resp.errors or raise an exception. That print would be a redundant noise injected into the app normal output (logs and warnings, primarily).
I think you should consider either removing those prints (if those are accidental debug prints) or replacing them with (debug-level?) logging (which I know you're already configured and use in other places)—depending on each case, I believe.
In multiple places in your SDK, you're using
print
outside the examples:e.g. https://github.com/Smartling/api-sdk-python/blob/f65d52b2361dbc29730ad82c85e7bbe7df644043/smartlingApiSdk/HttpClient.py#L95-L97
That leads to unexpected results for the users (myself included):
Note that the error is printed to the standard output. This is unexpected because in the app I'm integrating Smartling into, I would check for
status
and then logresp.errors
or raise an exception. That print would be a redundant noise injected into the app normal output (logs and warnings, primarily).I think you should consider either removing those
print
s (if those are accidental debug prints) or replacing them with (debug-level?)logging
(which I know you're already configured and use in other places)—depending on each case, I believe.