Skip to content

ethos-development/ethos-gae-toolkit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 

Repository files navigation

ethos Toolkit for Google App Engine

I love me some Google App Engine. And while I do love me some Django, too, sometimes the full Django stack is just too much. Anymore, I prefer writing small, ReSTful applications using just webapp and webapp2, Mako+HAML templates, and WTForms. This little toolkit describes that stack nicely and provides some nice integrations for them as well as some decent unit testing tools for RequestHandler classes.

How to use this toolkit...

I recommend using virtualenv to manage your environment and track dependencies. Since Google App Engine is expecting (read: REQUIRES) just a big, messy bucket of code -- libraries, dependencies and all -- here's how I keep things pretty:

Create a virtualenv for your project:

$> virtualenv path/to/your/project

Enter and activate the virtualenv:

$> cd path/to/your/project && source bin/activate

Install it locally1

$> pip install -e git+https://github.com/al-the-x/ethos-gae-toolkit#egg=ehos-gae-toolkit

Put all your application code somewhere neat, I recommend:

$> pushd app && cd app && touch app.yaml && popd

Put a link to your pip-installed libraries somewhere convenient2:

$> pushd app/ && ln -s ../lib/python2.7/site-packages lib && popd

In every entry-point for your application, make the lib/ path available for import3:

import sys

sys.path = ['lib'] + sys.path

Now, when you want to use something in the toolkit:

import ethos.appengine.toolkit as toolkit

class SomeTest(toolkit.GaeTestCase):

Footnotes:

* 2 -- Assuming you're using the Python 2.7 SDK. Change the path for the 2.5 SDK. * 3 -- Do yourself a favor and make one `dispatch.py` that serves most if not all of your URLs to make this easy.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages