A smooth sea never made a skilled sailor. – Franklin D. Roosevelt
Hi Pythonistas, a new week, a new ‘bite’ of Python coding! Love or hate Reddit, it has a lot of good data to work with. This week we have you write an app of your choice using the Reddit API. Have fun!
The challenge
First of all thanks shibasisp for raising the issue. We like the 2 examples you provided so we post them here:
-
A program that would fetch one challenge from easy, one from Intermediate and one hard from r/dailyprogrammer and shows it in the console. (PyBites: definitely something we could use!)
-
A program that would fetch 10 (or so) news items from r/news and sort them in decreasing order of upvotes.
More ideas
-
Fetch a user’s history, example.
-
Build a Reddit Bot, example.
-
Do some data analysis, for example: build word clouds, example.
-
You could even do a bit of sentiment analysis of a comment thread using something like textblob or the Natural Language Toolkit.
But these are just examples. Feel free to build anything. The goal is to sharpen your coding skills. If you scratch your own itch even better (last week’s Pomodori Tracker for example is something we use on a daily basis now).
Further resources
-
PRAW docs – probably your number one goto. The easiest way to get PRAW running is to create a virtual env and do a
pip install praw
and follow the docs. -
Reddit API resources page – info on OAuth / API limits / links to other wrapper modules.
Please share
While you’re at it, if you like this challenge upvote it on Reddit or retweet it on Twitter. The more people coding with us == more possible PR submissions for our review == the more we all learn from this!
Getting ready
See our INSTALL doc how to fork our challenges repo to get cracking.
This doc also provides you with instructions how you can submit your code to our community branch via a Pull Request (PR). We will feature your PRs in our end-of-the-week challenge review (previous editions).
Feedback
If you have ideas for a future challenge or find any issues, please contact us or open a GH Issue.
Last but not least: there is no best solution, only learning more and better Python. Good luck!
Keep Calm and Code in Python!
— Bob and Julian