You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Requests manage parameters encoding, and many other features... and so user code is much lighter.
You really might have a look...
Moreover it's very easy to add a caching mechanism thanks to http://requests-cache.readthedocs.org/
Not a big dependency...
Right now, HTTP request handling is a total of 6 lines, including the actual request (in connection.py). I don't see a reason that would justify the effort of putting in an external dependency - to make this code lighter?..
Is there a specific use case where you see requests as superior?
Another concern is that if this code becomes py2+3, then it has to be tested for both py2 and py3. And that's just technical debt.
I took a short look through your repos - do you want to integrate this package in some other tool, that is already using requests? If so, it might be best to just fork and do the changes you desire. It would only be marginally faster than rewriting from scratch though.
For testing both Python 2 and 3, you can create unit tests and use continuous integration (Travis for example). Hide API key using environment variable and your tests will be executed both with Python 2 and 3.
Activity
veox commentedon Jul 8, 2016
Basically, because I wanted a quick way to access Kraken API and didn't look around. Plus, that's an additional dependency.
Also, I have no interest in Python 2 anymore.
femtotrader commentedon Jul 8, 2016
Requests manage parameters encoding, and many other features... and so user code is much lighter.
You really might have a look...
Moreover it's very easy to add a caching mechanism thanks to http://requests-cache.readthedocs.org/
Not a big dependency...
veox commentedon Jul 8, 2016
Yup, I did take a short look. :)
Right now, HTTP request handling is a total of 6 lines, including the actual request (in connection.py). I don't see a reason that would justify the effort of putting in an external dependency - to make this code lighter?..
Is there a specific use case where you see
requestsas superior?Another concern is that if this code becomes py2+3, then it has to be tested for both py2 and py3. And that's just technical debt.
veox commentedon Jul 8, 2016
I took a short look through your repos - do you want to integrate this package in some other tool, that is already using
requests? If so, it might be best to just fork and do the changes you desire. It would only be marginally faster than rewriting from scratch though.femtotrader commentedon Jul 8, 2016
For testing both Python 2 and 3, you can create unit tests and use continuous integration (Travis for example). Hide API key using environment variable and your tests will be executed both with Python 2 and 3.
veox commentedon Jul 8, 2016
Well, I'm not the one who's going to do any of it any time soon.
OK to close?
femtotrader commentedon Jul 8, 2016
that's a pity... unit testing could at least be something to do to ensure your code won't break.
veox commentedon Jul 8, 2016
I'll get to it... eventually. It took 2 years to bother generating docs. There's just too much on my plate.
femtotrader commentedon Jul 8, 2016
ok ;-)
ping me if you want some tips
nosetests is very easy to use
https://github.com/ig-python/ig-markets-api-python-library/blob/master/tests/test_ig_service.py
You can run tests locally using :
Enabling Travis need to be done on their website and you need to add a very basic
.travis.ymllikehttps://github.com/ig-python/ig-markets-api-python-library/blob/master/.travis.yml
A first step could be to test public API calls.
After this, it will be possible to also test private API calls but you will need to secure API key
https://docs.travis-ci.com/user/encryption-keys/
veox commentedon Sep 21, 2017
requests-updatedhas been merged tomaster. Also releasedv2.0.0a1(alpha).Merge pull request #2 from veox/master