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

Uploaded Source

Built Distribution

redditreport-0.3.1-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: redditreport-0.3.1.tar.gz
  • Upload date:
  • Size: 2.7 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.3.1.tar.gz
Algorithm Hash digest
SHA256 51fdfa052b2e5fd7269a63131f2d5474318f9cdbcd536c5908d5168597e896f4
MD5 37356197d50373ce3944e091d62838f4
BLAKE2b-256 b2f21319722570cf2b84ce7d97b08b2471594421e42c120d0239d2d056c12906

See more details on using hashes here.

File details

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

File metadata

  • Download URL: redditreport-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 4.4 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.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 be84045cf26576b0c22c57502b841ebb0ed18c6606a4537d41bb91d89a39d4b0
MD5 5973b770d5aede0f5e2132197617adcb
BLAKE2b-256 293849afc99260f26f2c936382b64ae08ba48932e1bd5ab9fb66596761fb8917

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