reddit_api is a Python wrapper for Reddit's API, aiming to be as easy to use as possible. Here's a quick peek, getting the first 10 stories from the 'hot' section of the 'opensource' subreddit.
import reddit
r = reddit.Reddit(user_agent="my_cool_application")
stories = r.get_subreddit('opensource').get_hot(limit=5)
list(stories)
this displays
[< Submission: 1 :: OpenFOAM: Open Source Computational Fluid Dynamics >,
< Submission: 9 :: My new open source project, Bunchify >,
< Submission: 93 :: Arrested while contributing to OpenStreetMap >,
< Submission: 27 :: DK: 25,000 hospital staff Copenhagen region to use open source office suite >,
< Submission: 24 :: Eclipse online >]
Install
You can install via pip
pip install reddit
Or via setup.py
python setup.py install
Product's homepage
Requirements:
· Python
Download reddit_api 1.3.7 Free
Tags: Reddit API , Python wrapper , Python , Reddit , API ,
submission, , submission, submission, open, source, open source, install, stories, via, python, online, installproduct's, dk 25000, openstreetmap, setuppy, project, staff, region, hospital, copenhagen, office, arrested, bunchify, contributing

No comments:
Post a Comment