Git Product home page Git Product logo

praw's Introduction

PRAW: The Python Reddit API Wrapper

https://travis-ci.org/praw-dev/praw.png

PRAW, an acronym for "Python Reddit API Wrapper", is a python package that allows for simple access to reddit's API. PRAW aims to be as easy to use as possible and is designed to follow all of reddit's API rules. You have to give a useragent that follows the rules, everything else is handled by PRAW so you needn't worry about violating them.

Here's a quick peek, getting the first 5 submissions from the 'hot' section of the 'opensource' subreddit:

>>> import praw
>>> r = praw.Reddit(user_agent='my_cool_application')
>>> submissions = r.get_subreddit('opensource').get_hot(limit=5)
>>> [str(x) for x in submissions]

This will display something similar to the following:

['10 :: Gun.io Debuts Group Funding for Open Source Projects\n Gun.io',
 '24 :: Support the Free Software Foundation',
 '67 :: The 10 Most Important Open Source Projects of 2011',
 '85 :: Plan 9 - A distributed OS with a unified communicatioprotocol  I/O...',
  '2 :: Open-source webOS is dead on arrival ']

Installation

PRAW works with python 2.6, 2.7, 3.1, 3.2, and 3.3. The recommended way to install is via pip

$ pip install praw

If you don't have pip installed, then the Hitchhiker's Guide to Python has a section for setting it up on Windows, Mac and Linux. There is also a Stack overflow question on installing pip on Windows that might prove helpful.

Alternatively you can do it via easy_install

$ easy_install praw

Support

The official place to ask questions about PRAW, reddit and other API wrappers is r/redditdev. If the question is more about Python and less about PRAW, such as "what are generators", then you're likely to get more, faster and more in-depth answers in r/learnpython.

If you've uncovered a bug or have a feature request, then make an issue on our project page at github.

Documentation

PRAW's documentation, which includes tutorials, information on configuring PRAW and other good stuff can be found at readthedocs.

License

All of the code contained here is licensed by the GNU GPLv3.

praw's People

Contributors

bboe avatar damgaard avatar tmelz avatar julian avatar nemec avatar deimos avatar hazimgazov avatar jensechu avatar rasher avatar dahlia avatar shalecraig avatar tailszefox avatar fluxflashor avatar simongreenhill avatar pinkerton avatar sente avatar tomdunn avatar wiwiweb avatar epsy avatar binaryechoes avatar stobias123 avatar go1dfish avatar vindimy avatar anlsh avatar chizu avatar john2x avatar ivantrendafilov avatar xiphirx avatar vitteloil avatar soult avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.