web.py scaffolding tool, generate MVC code (Models, Views, Controllers and RESTfull API) from command line


Keywords
scaffold, mvc, web, py, mysql, heroku, bootstrap, jquery, ssl, api, restful
License
GPL-3.0
Install
pip install kuorra==0.7.2.2

Documentation

kuorra

Introduction

Kuorra is a WebApp Model, it's based on MVC Pattern, and use Web.py like Microframework.

Use Kuorra to create a MVC skeleton for work with Web.py, MySQL and Heroku App.


Kuorra Model

Alt text


Install Kuorra

  • In a terminal write python -m pip install kuorra, this download all requirements packages.

Alt text

Alt text


Upgrade Kuorra

  • In a terminal write python -m pip install kuorra ---upgrade, this update all requirements packages.

Alt text


Functions

  • Script for create a demo DB.

  • Config one DB conection.

  • Create a products Controller.

    • Index [index.py]
    • View [view.py]
    • Edit [edit.py]
    • Delete [delete.py]
    • Insert [insert.py]
  • Create a products Model. [model_products.py]

    • get_all_products
    • get_products
    • delete_products
    • insert_products
    • edit_products
  • Create a products Views:

    • Index [index.html]
    • View [view.html]
    • Edit [edit.html]
    • Delete [delete.html]
    • Insert [insert.html]
    • Master [master.html] Web Template
  • Create a products API. [api_products.py]

    • GET all products (GET)
    • GET one product (GET id)
    • INSERT one product (PUT id, fields)
    • DELETE one product (DELETE id)
    • UPDATE one product (UPDATE id, fields)
  1. Active a SSL connection

How to Use Kuorra

Create new project

kuorra new project_name

Alt text

  • Acme Store MVC Skeleton

Alt text


Config new project

  • The new project have a demo database called acme_store_mvc, with a products table.

  • The database script is written in the file data + schema.sql.

Alt text

  • Connect to MySQL server using mysql cli, mysql workbench or any other application.

Alt text

  • Execute the script schema.sql for create the DB.

Alt text

  • Products table

Alt text

  • In the file application + models + model_products.py modify the connection parameters

    • db_host = 'localhost'
    • db_name = 'acme_store_mvc'
    • db_user = 'your user name'
    • db_pw = 'your password'

Alt text


Deploy project

  • Into de folder where is the app.py file execute kuorra dep for deploy de WebApp.

kuorra dep

Alt text

  • For stop de server press Ctrl + C.

Alt text


Acme store Demo

Alt text


Alt text


Alt text


Alt text


Alt text


Author Salvador Hernández Mendoza
Email salvadorhm@gmail.com
Twitter @salvadorhm