Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
83 lines (56 sloc) 3.18 KB

Getting Started

nacelle depends on a few external external libraries for operation, however, we have a policy that nacelle core should never have a hard dependency on any library which is not available with the Google Appengine Python SDK, therefore getting started is easy.

You'll first need to install the App Engine Python SDK. See the README file for directions. You’ll need python 2.7 and pip 1.4 or later installed too.

Appengine requires that all external libraries being used should be included (vendored) into the application directory itself. Different developers have their own methods for dealing with this issue, and nacelle should work perfectly fine with whatever your preferred application structure is (if it doesn't, let us know). This article covers one such method, aiming to provide a quick overview of what it takes to get started with nacelle.

New Project Skeleton

The nacelle project provides a barebones skeleton you can use to get your application off the ground quickly. You should clone the skeleton's git repository to a convenient location:

$ git clone https://github.com/nacelle/nacelle-skeleton.git your-project-name

Once cloned, you should use pip to install the latest version of nacelle into the application's vendor directory:

$ cd your-project-name
$ pip install -r requirements.txt -t vendor

Note: App Engine can only import libraries from inside your project directory.

You should now be able to run your project locally from the command line using the regular Appengine SDK tools:

$ dev_appserver.py .

Visit the application http://localhost:8080

See the development server documentation for options when running dev_appserver.py.

Deploying your application

To deploy your application you first need to ensure you've created a project using the appengine Admin Console. Once created, you can deploy your application with the following command:

$ appcfg.py -A <your-project-id> --oauth2 update .

Congratulations! Your application is now live at your-project-id.appspot.com

Installing additional libraries

See the Third party libraries page for libraries that are already included in the SDK. To include SDK libraries, add them in your app.yaml file. Other than libraries included in the SDK, only pure python libraries may be added to an App Engine project.

To install additional libraries from pypi you can use pip, e.g. to install the raven library for reporting errors to a sentry server, simply run:

$ pip install raven -t vendor