redditraffler is a website that facilitates contests or giveaways using Reddit submissions as a platform.
Read more about it at https://redditraffler.com.
The issue tracker for this project is on GitHub.
- Python 3.6+
- 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 email@example.com:timorthi/redditraffler.git $ 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/config.py 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.
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_APP=runserver.py flask db upgrade
Starting The App
$ export FLASK_APP=runserver.py
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