- You’ve installed SQL Server with Python
- You’ve then installed pip
- Then you used pip to install PRAW
- You then installed Pandas with pip
The last thing we need to do before connecting to Reddit is to create our API access. It’s a simple process, let’s get it done.
First of all, you need to create a Reddit account. Go to the following link to create your user. Note down your username and password, we’ll need those later.
Once you have a reddit username set up make sure you’re logged in and go to the apps page;
We’re going to create our app, click the nice big button.
Choose a name for your application then select the radio button to create a script. For the redirect URL you’ll want to enter http://localhost:8080
Once you’ve done these three things, click ‘create app’. You’ll be taken to the screen with some useful information you’ll need.
From this screen you’ll need to note your ‘personal use script; as well as the ‘secret’.
At this point, you should have 5 pieces of information;
- Reddit Username
- Reddit Password
- App Name
- Personal Use Script (14 characters)
- Secret (27 characters)
Once you’ve got all of these we can use these to connect to Reddit from SQL Server (with Python).