Skip to main content

Reddit Get

Reddit-Get Integration codecov

This is a python CLI that will pull posts from Reddit. In order to use this CLI, you'll need to set up a Reddit app of your own so that you can authenticate into Reddit with your own credentials. Never fear, this process is pretty straight forward.

Installation

Using python 3.8 or later, run pip3 install reddit-get. But also, you need to set up a reddit cli app so you can access reddit through the command line. See below for that.

Create a Reddit Application

  1. Navigate to https://reddit.com/prefs/apps

  2. Click create an app

  3. You should see something like this:

    create an app form

  4. You can then fill this form out with some values like these (choose whatever you like):

    create an app form filled

After that, you'll need to find the client_id and client_secret for your new app and insert those into a configuration file on your system.

Adding a Reddit-Get Config File

  1. Create a file in your home directory called .redditgetrc (currently this is the default name and is only configurable when you call the script each time, so this name is probably for the best for now)

  2. Make your reddit config file look like this:

    [reddit-get]
    client_id = "<your client id here>"
    client_secret = "<your client secret here>"
    user_agent = "<anything, e.g. My super awesome cli app by u/pm_me_myour_apps>" 
    username = "<your reddit username>"
    password = "<your reddit password>"
    

Once this is set up, you should be good to go.

Example Usage

Once you've got your cli app set up and reddit-get installed, you can run it like this:

$ reddit-get post --subreddit showerthoughts --post_sorting top --limit 10 --time_filter all --header --markdown

And here's what was returned today:

##### *Top Posts from r/showerthoughts*
- *Whoever created the tradition of not seeing the bride in the wedding dress beforehand saved countless husbands everywhere from hours of dress shopping and will forever be a hero to all men.*
- *We laugh at dogs getting excited when they hear a bark on TV, but if TV was a nonstop stream of unintelligible noises and then someone suddenly spoke to you in your language, you'd be pretty fucking startled too.*
- *When you're a kid, you don't realize you're also watching your mom and dad grow up.*
- *Dads probably bond with dogs so much because, in our society, men don’t get shown a lot of affection but dogs give tons of affection regardless*
- *Being able to tolerate the sound of your own voice in a video is probably the highest form of self acceptance.*
- *Girls don't compliment guys because they're likely to take it non-platonically, guys take it non-platonically because it happens so infrequently they don't know how to handle it*
- *If elevators hadn't been invented, all the CEOs and important people would have their offices on the first floor as a sign of status.*
- *If EA suffers big enough losses from the backlash of Battlefront 2, and it all started because some guy couldn't unlock Vader, this will be the second time Anakin brought balance to something.*
- *Being able to do well in high school without having to put in much effort is actually a big disadvantage later in life.*
- *During a nuclear explosion, there is a certain distance of the radius where all the frozen supermarket pizzas are cooked to perfection.*

For more help with the post command, you can of course run

$ reddit-get post --help

Enjoy! This is early stages, so I'll be adding more features as time goes on.

Metadata

Release files for reddit-get 1.0.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for reddit-get 1.0.6
File Size Uploaded
reddit-get-1.0.6.tar.gz 8.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for reddit-get 1.0.6
File Interpreter ABI Platform
reddit_get-1.0.6-py3-none-any.whl Python 3 none any Details

Total release size: 16.1 kB

Release files / reddit-get-1.0.6.tar.gz

Download URL reddit-get-1.0.6.tar.gz
Size 8.0 kB
Tags Source
SHA-256 checksum
How to use checksums
f294fd0696c1ee90fe88c9e1d05d4c1290815cebf68c4172e6b9be1964b69021
BLAKE2b-256 checksum
How to use checksums
aa1d767e79ece27ca07eb6df09f133b1bb2d315f9f64a1833fc356a74cf2d193
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.8 CPython/3.10.4 Linux/5.13.0-1022-azure

Release files / reddit_get-1.0.6-py3-none-any.whl

Download URL reddit_get-1.0.6-py3-none-any.whl
Size 8.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a0ba75b50e229291b01b9b8daf5f8fe87fd05711860eb162668f91c86be971d1
BLAKE2b-256 checksum
How to use checksums
2ee07c1bea7656042ef84cbf9a6e66fbf4f02d19d823deedc6f1ab2220f9fda7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.8 CPython/3.10.4 Linux/5.13.0-1022-azure

Release history Release notifications | RSS feed

1.1.0

2 release files

This release

1.0.6 This release

2 release files

1.0.3

2 release files

1.0.0

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.3

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page