Skip to content

blossom/flask-gae-skeleton

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

79 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Motivation

We are currently migrating our projects from django to flask. Since we also intend to use flask for entirely new projects, it made sense to save on initial setup time. So we created a project skeleton which includes some of the things (libs and configuration) that we pick for most projects.

Components

General

here is a list of assembled components

  • flask decorators for (cache_page, login_required)
  • gae specific monkeypatch for werkzeug debugger http://dev.pocoo.org/projects/werkzeug/wiki/UsingDebuggerWithAppEngine
  • a simple user model
  • google appengine specific development/production environment switch
  • google appengine appstats configured
  • google appengine memcache caching backend configured
  • favicon.ico stub to avoid unneeded error logs
  • deck module with 26 char uuid generator
  • deck module with JsonProperty for the datastore
  • lib directory for external dependencies prepended to syspath

Libraries

Python

Dependencies

General

Testing

Setup

clone repository

git clone https://github.com/blossom/flask-gae-skeleton.git <project_name>

change to directory of <project_name>

cd <project_name>

fetch all the submodules via

git submodule update --init

set your own appengine application id in app.yaml

change the 'secret_key' in settings.py by generating a new one

add replace remote

git remote rm origin
git remote add origin <new_remote like [email protected]:your_name/project_name.git>
git commit -am "initial setup"
git push origin master

Update from Skeleton

Add the remote and merge in all changes and removes the old stuff again.

git remote add skeleton https://github.com/blossom/flask-gae-skeleton.git
git pull skeleton
git checkout -b skeleton remotes/skeleton/master
git rebase <your_development_branch like master>
git checkout <your_development_branch like master>
git merge --no-ff skeleton
git branch -D skeleton
git remote rm skeleton
git submodule update

Usage

Run Application

Go to path "gae" and run

dev_appserver.py .

Run Test Enviroment

Go to path "gae" and run

nosetests-2.5 --with-gae tests/

Run Remote Console

Go to path "gae" and run

python2.5 appengine_console.py <app-id>

TODO

things we still need to extract and clean up from other projects

About

Flask skeleton for Google App Engine

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages