wiki:QuickStart

Version 7 (modified by apoirier, 6 years ago) (diff)

--

QuickStart

This document describes the standard installation of the Nagare framework on Linux and how to start your first application. To install it on Windows, read NagareInstallation.

1. Stackless Python installation

The Nagare framework uses Stackless Python (version 2.5.2 or above). So, grab the latest version of Stackless Python for your platform and install it.

For example, to install Stackless Python in the <STACKLESS_HOME> directory, on Linux:

cd /tmp
wget http://www.stackless.com/binaries/stackless-271-export.tar.bz2
tar jxvf stackless-271-export.tar.bz2

cd stackless-271-export
./configure --prefix=<STACKLESS_HOME>
make all
make install

2. Nagare installation

The following two steps install the Nagare framework and all its dependences into the <NAGARE_HOME> directory of your choice.

2.1 Create a virtual environment

Download virtualenv and create a virtual environment into the <NAGARE_HOME> directory with Stackless Python:

cd /tmp
wget http://pypi.python.org/packages/source/v/virtualenv/virtualenv-1.6.4.tar.gz
tar zxvf virtualenv-1.6.4.tar.gz

<STACKLESS_HOME>/bin/python virtualenv-1.6.4/virtualenv.py <NAGARE_HOME>

2.2 Install the framework

Install the whole framework and all its dependencies into <NAGARE_HOME> with easy_install:

<NAGARE_HOME>/bin/easy_install 'nagare[full]'

3. Create your first application

To create the application my_first_app, in the current directory:

  1. create the application skeleton:

    <NAGARE_HOME>/bin/nagare-admin create-app my_first_app
    
  2. register your new application to the framework:

    cd my_first_app; <NAGARE_HOME>/bin/python setup.py develop
    
  3. launch it:

    <NAGARE_HOME>/bin/nagare-admin serve my_first_app
    

Congratulations your first application is available at http://localhost:8080/my_first_app.

The source code of your application is in my_first_app/my_first_app/app.py, ready to be modified !