3 min read Author: klaas

Getting started with PythonOnWheels

It's very easy to develop your app with PythonOnWheels.

This article just shows you how to install PythonOnWheels and to run the "hello PythonOnWheel's world" app. If you are interested in developing a real sample app with PythonOnWheels go to the documentation where we will develop a sample todo app in 3 simple steps.

Getting started path:

Installation:

pip install -U pythononwheels

See it work:

starting the server for the first time... [<3 Minutes read]

After installing you should have the generate_app script available.This installs the PythonOnWheels Application with the given name (-n) inthe given path (-p)

generate_app -n todo -p <path>

We now have a a PythonOnWheels application, named todo in the given <path>.

If you cannot find the generate_app script
Check this short FAQ documentation

Go on, create a virtualenv and install the requirements

Switch to the todo app directory create a virtualenv:

virtualenv venv

then cd into the todo directory, activate the virtualenv 

  • On Windows: (if you are in your todo app directory)

.\venv\Scripts\activate

  • on Linux/OSX:

source ./venv/bin/activate

and install the requirements with

pip install -r requirements.txt

PYTHONPATH

Make sure that the directory "above" your chosen <path>  is in your PYTHONPATH. So if you decided to install your app in /development you should add /development to your PYTHONPATH. This is how you append to your PYTHONPATH. 

OSX/Linux

export PYTHONPATH=$PYTHONPATH:/development

Windows

set PYTHONPATH=%PYTHONPATH%;c:\development


Now we can run the server to see the "hello PythonOnWheel's world" site:

python server.py

Point your browser to:

http://localhost:8080

You should see something like this:


That's is it!

You have created your first PythonOnWheels Application.

Working with Databases to store your data is the next step. But it's as easy as this.


-> If you have problems accessing the page using chrome: use the fox or..

The reason is probably that chrome auto redirects you to https. To turn this of for localhost see this on SO.


Check the next steps below.


Watch this short asciinema to sum it up:

Next:

Find more in depth hands on tutorials in the documentation