Package: asyncpraw
Async PRAW, an abbreviation for “Asynchronous Python Reddit API Wrapper”, is a Python
package that allows for simple access to Reddit’s API. Async PRAW aims to be easy to use
and internally follows all ofReddit’s API rules. With Async PRAW there’s no need to
introducesleepcalls in your code. Give your client an appropriate user agent and
you’re set.InstallationAsync PRAW is supported on Python 3.7+. The recommended way to install Async PRAW is viapip.pipinstallasyncprawTo install the latest development version of Async PRAW run the following instead:pipinstall--upgradehttps://github.com/praw-dev/asyncpraw/archive/master.zipFor instructions on installing Python and pip see “The Hitchhiker’s Guide to Python”Installation Guides.QuickstartAssuming you already have a credentials for a script-type OAuth application you can
instantiate an instance of Async PRAW like so:importasyncprawreddit=asyncpraw.Reddit(client_id="CLIENT_ID",client_secret="CLIENT_SECRET",password="PASSWORD",user_agent="USERAGENT",username="USERNAME",)With theredditinstance you can then interact with Reddit:# Create a submission to r/testsubreddit=awaitreddit.subreddit("test")awaitsubreddit.submit("Test Submission",url="https://reddit.com")# Comment on a known submissionsubmission=awaitreddit.submission(url="https://www.reddit.com/comments/5e1az9",fetch=False)awaitsubmission.reply("Super rad!")# Reply to the first comment of a weekly top thread of a moderated communitysubreddit=awaitreddit.subreddit("mod")asyncforsubmissioninsubreddit.top(time_filter="week"):comments=awaitsubmission.comments()awaitcomments[0].reply("An automated reply")# Output score for the first 256 items on the frontpageasyncforsubmissioninreddit.front.hot(limit=256):print(submission.score)# Obtain the moderator listing for r/testsubreddit=awaitreddit.subreddit("test")asyncformoderatorinsubreddit.moderator:print(moderator)Please see Async PRAW’sdocumentationfor more
examples of what you can do with Async PRAW.Async PRAW Discussion and SupportFor those new to Python, or would otherwise consider themselves a Python beginner,
please consider asking questions on ther/learnpythonsubreddit. There are wonderful people there who
can help with general Python and simple Async PRAW related questions.Otherwise, there are a few official places to ask questions about Async PRAW:r/redditdevis the best place on Reddit to ask
Async PRAW related questions. This subreddit is for all Reddit API related discussion so
please tag submissions with[Async PRAW]. Please perform a search on the subreddit
first to see if anyone has similar questions.Real-time chat can be conducted via thePRAW Slack Organization(please create an issue if that invite link has expired).Please do not directly message any of the contributors via Reddit, email, or Slack
unless they have indicated otherwise. We strongly encourage everyone to help others with
their questions.Please file bugs and feature requests as issues onGitHubafter first searching to ensure a
similar issue was not already filed. If such an issue already exists please give it a
thumbs up reaction. Comments to issues containing additional information are certainly
welcome.NoteThis project is released with aContributor Code of Conduct. By
participating in this project you agree to abide by its terms.DocumentationAsync PRAW’s documentation is located athttps://asyncpraw.readthedocs.io/.HistoryFebruary 2019:
Joel forked PRAW and began work on Async PRAW, an asynchronous compatible version of
PRAW.July 2020:
Async PRAW was moved into the praw-dev namespace.LicenseAsync PRAW’s source (v7.1.1+) is provided under theSimplified BSD License.Copyright ©, 2020, Joel Payne