Skip to content

sunscrapers/flask-boilerplate

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Build Status

Flask Boilerplate

This repository contains a sample minimal Flask application structure that includes:

  • SQLAlchemy
  • Alembic
  • Celery
  • py.test

It runs on both Python 2.7 and 3.5.

Installation

First, clone the repository and create a virtualenv. Then install the requirements:

$ pip install -r requirements.txt

Before running the application make sure that your local PostgreSQL server is up. Then create the databases:

CREATE DATABASE flask_example;
CREATE DATABASE flask_example_test;

Now you can create the tables using Alembic:

./manage.py db upgrade

Finally you can run the application:

./manage.py runserver

or play in the Python REPL:

./manage.py shell

In order to run unit tests in py.test invoke:

./manage.py test

Contribution

We are happy to see your way of scaffolding Flask applications. Feel free to submit an issue with your ideas or comments.

About

The basic Flask application structure that includes SQLAlchemy, Alembic, py.test and celery.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published