A new approach to the Python#5
Closed
KeynesYouDigIt wants to merge 4 commits into
Closed
Conversation
Author
|
Any word on this guy? feedback/suggestions? |
Author
|
no luck? any feedback? |
Contributor
|
We value contributions to our GitHub repositories and thank you for taking the time to make a pull request. Unfortunately, we can't accept this request and have closed it for non-technical reasons. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull does a bunch of different things, the central piece being replacing httplib calls with calls from requests, which is currently one of the most dominant and useful libraries in the entire ecosystem.
See-
http://pypi-ranking.info/alltime
http://stackoverflow.com/questions/2018026/what-are-the-differences-between-the-urllib-urllib2-and-requests-module
Second, this version of the python example is directed at producing calls and printing the full result rather than a command line tool for looking at data - the original python scripts came across more as the later. Taking code and incorporating into your app is thus much more natural
To test the example code, simply run
>python {script of interest}This pull requests also eliminates a plethora of redundancies, and is robustly tested. I was not able to make the old scripts work. I do have the httplib calls preserved in the /older versions directory, feel free to move all the old python code there or preserve elsewhere before pulling this new code in, just incase there is something wrong with it that is discovered later.
Let me know what you think and if it can be improved. Thanks!
I will hopefully be using this to plug the data into some of my own projects soon, and perhaps build a flask API for exploring the data in the API (that might be s/w redundant given postman)