All Projects → rcarmo → ink-bottle

rcarmo / ink-bottle

Licence: MIT license
A minimal skeleton for doing Bottle apps in a structured fashion (targeting Python 2.7 or above)

Programming Languages

python
139335 projects - #7 most used programming language
CSS
56736 projects

ink-bottle

A minimal skeleton for doing Bottle apps in a structured fashion (targeting Python 2.7 or above), meant as reference code for training sessions.

Should be usable out of the box (even if it only displays one view).

Filesystem Layout

+-- app.py                # entry point
+-- etc
|    +-- default.json     # main configuration file
+-- api
|    +-- [model].py       # RESTful routes for each model
+-- routes 
|    +-- [kind].py        # all other routes (static, actions, etc.)
+-- controllers
|    +-- [behavior].py    # controllers used by routes
+-- lib
|    +-- bottle.py        # more bang than Flask
|    +-- peewee.py        # almost as nice as the Django ORM
|    +-- config.py        # loads up the JSON file 
|    +-- utils            # my little bag of tricks
|    |    +-- core.py
|    |    +-- urlkit.py
|    |    +-- stringkit.py
|    |    +-- datekit.py
|    +-- [dependencies]   # Include ALL the dependencies locally
+-- models
|    +-- db.py            # Base models and database setup
|    +-- [store].py       # Other data stores (Redis, etc.)
+-- static                # Static assets (HTML and sundry)
+-- views
     +-- layout.tpl       # Base layout for templates
     +-- [group]          # Partials for each entity/screen

Running

make serve

Note

Don't forget to do git submodule update --init when checking out the source.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].