Skip to main content

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


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.2.tar.gz (2.6 kB view details)

Uploaded Source

Built Distribution

redditreport-0.2.2-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file redditreport-0.2.2.tar.gz.

File metadata

  • Download URL: redditreport-0.2.2.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

Hashes for redditreport-0.2.2.tar.gz
Algorithm Hash digest
SHA256 a342925bcedff86de6117b8a04c09375c1324968e0309ee2652a49c599f9a499
MD5 2740e0c19206784a94e05ab964217a79
BLAKE2b-256 707b9b4c858a5d14d8f95e78d3a486102bf19f4264ed7e56fb42ab998b106417

See more details on using hashes here.

File details

Details for the file redditreport-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: redditreport-0.2.2-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

Hashes for redditreport-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 07a6dfbd695aed009134a46032e6a2547211c8d7bf2c2e11704cf2be540b9996
MD5 7e7f27b19d64ca6371fd93c4f8e1792d
BLAKE2b-256 03aa9d12c7940d4ea39b54b8096d708793a2ebb272c19d4f0353c84abd927267

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page