Skip to content

Parite 1 - Setup

Warning : This project is private and is still in design, not ready for production. Create an issue if you encounter any bugs!

Make sure you have python3.6 +. Let’s start by creating a virtual environment.

$ python --version

Install Nimba

$ pip install nimba

Create nimba application

$ nimba create --app awesome_app

Structure project

  • application - Your application project (you will spend most of your time here).
    • - Your logic code
    • - Define here the schema of your database
    • - Write your test here
  • staticfiles - The static files.
  • templates - Your template (html page etc…).
  • - Settings database, secret key and other.
  • - the command utility, start the server, create views and many more.

Run server

In your project app awesome_app

$ python serve

Monitoring for changes...
Starting server in PID 72932
June 25, 2021 - 18:04:32
Serving on
Quit the server with CONTROL-C.

You cant change port with python serve -p 7000 (runing with port 7000)
Or sharing ip python serve -s 0:7000 (

Create other view

A view is a python function decorated with an url path, accepting a web request and returning a response. This response can contain html, template, xml etc.

A simple view returning html code with a decorate path. Open your in your app folder

from nimba.http import router

def about(request):
    return "<h1> Hello, World </h1>"

Each life is decorated by a road indicating a path

  • from nimba.http import router
  • @router('/about') the router decorator makes your function a view, it receives web requests.
  • request is the request web content all data get and post


Continue to the tutorial Partie 2 - Endpoint