The raffle system for Reddit submissions.
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


redditraffler is a website that facilitates contests or giveaways using Reddit submissions as a platform.

Read more about it at


The issue tracker for this project is on GitHub.

Non-development related questions or issues can be forwarded to me on Reddit or via e-mail.

Development Requirements

redditraffler is a Flask app with jQuery for DOM manipulation, so you'll need to know Python and/or JavaScript for development. The required tools are:

  • Python 3.6+
  • pip
  • Redis for job queueing and caching
  • PostgreSQL is recommended since it's used in production, but SQLite will work fine.
  • Reddit API keys (one web app, one script app)


$ git clone
$ cd redditraffler
$ virtualenv -p python3 venv  # (optional)
$ source venv/bin/activate  # (optional)
$ pip install -r requirements.txt


For the app to run properly, you'll need to provide configuration values for your database, Redis, and your Reddit app+bot credentials. See app/ for the required environmental variables.

You can load these environmental variables in manually or you can create a .env file in the app root. See python-dotenv for more information.

Database Setup

We use Postgres in production so it'd be a good idea to do the same for development. Once you have your database set up and app config pointing to it, you'll need to run the database migrations.

$ flask db upgrade

Starting The App


$ export

To start the Flask development server:

$ FLASK_DEBUG=1 flask run

To start a worker process:

$ flask rq worker


Run the app's tests with

$ pytest