Tools to create reports using the Reddit API + praw library.
Project description
Example
from redditreport.core import RedditUser as ru
from redditreport.core import RedditReport as rr
from redditreport.utils import export
# Your Reddit API credentials.
# More info: https://www.geeksforgeeks.org/python-praw-python-reddit-api-wrapper/
client_id = 'your-client-id'
client_secret = 'your-client-secret'
user_agent = 'your-user-agent'
reddit_user = ru.RedditUser(client_id, client_secret, user_agent)
# Reddit object instance from praw library
reddit_instance = reddit_user.get_reddit_instance()
# RedditReport instance
subs_list = ['pics', 'askreddit'] # must be a list
lines_per_sub = 3 # must be an integer
reddit_report = rr.RedditReport(reddit_instance, subs_list, lines_per_sub)
# Pulls data from Reddit
report_data = reddit_report.generate_data()
# Uses utils module to export data to Excel file format
filename = 'reddit_report_excel.xlsx'
export.to_excel(report_data, filename)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
redditreport-0.1.1.tar.gz
(1.7 kB
view hashes)
Built Distribution
Close
Hashes for redditreport-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0a1527a22560d113d1b845fb1dc5e15a4d6c4e8a1561b43e31ca1233e72957e1 |
|
MD5 | 73f730f067c23ff68f23b83e4caeb571 |
|
BLAKE2b-256 | 77ff79083427575788652222ddfb745eae3ef53456a9f68dd9859b44f6dcd4ae |