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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: redditreport-0.2.1.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.1.tar.gz
Algorithm Hash digest
SHA256 96c99c66a68c5bf81ed945ff635c4a90826058ce1cd391779d18dbc5fe09fc87
MD5 ddf4967cbef42c1a041da5f690aa766e
BLAKE2b-256 adf82c48596e565c30fade0ded733d0b664b85d4d6a153c51bacb4eb4f45035e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: redditreport-0.2.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 564445cf1b4170ee91080b02af9e0485fce073fbcf4fddf7aaafd2694dcd8218
MD5 07a1ddda02461eae39af4c59a5255974
BLAKE2b-256 6b6e75636745efc82762411b289b563fa3373435e56017847c647be9b46d8c80

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