3 min read Author: klaas

Getting started with PythonOnWheels -Installation

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. 

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) in the 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:

python -m venv venv    

(Or use the classic virtualenv for this)

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