min read Author: klaas

Conventions and design

PythonOnWheels Vision is:

If you want start to develop your web-application and focus on the App, instead of the frameworks, you are in the right place. PythonOnWheels feels right if you do not recognize that you use it.

The base for PythonOnWheels were the ideas from Ruby On Rails. Which are for me like: don't have to configure much, don't have to code boilerplate, just generate a model, a controller and render some scaffold views and be live.

PythonOnWheels bundles some of the great modules and libraries out there and integrates them the Rails style. The integrated libraries are taking the most common use-cases away from you. Like automatic (generated)

  • Storing data in a Database SQL or NoSQL
  • Authenticating Users
  • Generating a REST API
  • Validating data
  • Generating a nice HTML frontend for your data


  • Authentication  (oAuth)
  • NoSQL database access (MongoDb, tinyDB and ElasticSearch[Alpha]
  • SQL database access (sqlalchemy)
  • Schema Migrations (alembic)
  • data management (models)
  • validation of models (cerberus)
  • REST API management and routing (werkzeug/tornado)
  • view scaffolding (bootstrap 4 / semanticUI)
  • JSON, XML, CSV support for models 
  • Async Webserver (tornado)

Directory structure

PythonOnWheels is Model-View-Controller based, so when you install it and generate your first application you will find the following directory structure:

Hopefully it's pretty self explanatory. The most important dirs for the start are the:

  • models/ dir -> where you will find all your generated models
  • handlers/ dir -> where you will find all your generated handlers
  • views/ dir -> where all your scaffolded views will be generated

Convention over configuration

I like the convention over configuration idea from rails. Let obvious things be done by the computer and just use them as expected. In PythonOnWheels you will find that very often. Handlers automatically find their models when you give the handler and the model the same name. Think of a todo model, then give the handler the same name. Done.

Generate the model

python generate_model.py -n  todo -t tinydb

Generate the handler

python generate_handler.py -n todo -t tinydb --rest


The handler is automatically connected to the model and will offer all HTTP REST methods in this case as well. So just two lines and you have a working application with a REST API which will store your data really in a NoSQL DB (tinydb) in this case.

No installation, no configuration, no nothing. Just right away your App. 

Generating views

Getting an HTML interface will really taking some time .... no ! Just 

python generate_scaffold.py -n todo -t bs4

and you are done. This is how it looks like: 

Create View

List view

(After creating a first todo using the HTML UI)

This is the idea behind PoW

PythonOnWheels idea is to take all the boilerplate from you and lets you really focus on your app and idea. So it's really quick to get from zero to a working app.