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.2.3.tar.gz
(2.6 kB
view details)
Built Distribution
File details
Details for the file redditreport-0.2.3.tar.gz
.
File metadata
- Download URL: redditreport-0.2.3.tar.gz
- Upload date:
- Size: 2.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/51.3.3 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4bbeef4772f05caced8e67746dc4da7e94e4aa7e0d6c8dc55a4f00f2b1c7c905 |
|
MD5 | 22656b8cec35336059dbafc9bf07aa1e |
|
BLAKE2b-256 | 1863ad1c8ed34a38e388811aa04e96f6103f3b6766c96d9c1b9c322d1db2dfaa |
File details
Details for the file redditreport-0.2.3-py3-none-any.whl
.
File metadata
- Download URL: redditreport-0.2.3-py3-none-any.whl
- Upload date:
- Size: 4.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/51.3.3 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 40422b37e657f8db443a8b3d76908b964f83259dcf7076f6041d25192c6bfa6d |
|
MD5 | 79871b856429cd00f4e341c7a7b36140 |
|
BLAKE2b-256 | 3223f513f4e46e57a2d2ecdf485feeecf11159a4a80c1cadf74ec40c987ae291 |