Skip to content

Instantly share code, notes, and snippets.

@rcarmo
Created June 25, 2013 11:06
Show Gist options
  • Save rcarmo/5857681 to your computer and use it in GitHub Desktop.
Save rcarmo/5857681 to your computer and use it in GitHub Desktop.
Bottle layout
<root>
+-- dev.py # Stub to run Bottle while coding
+-- app.py # WSGI glue
+-- tasks.py # Celery glue
+-- fabfile.py # Fabric deployment/build script
+-- Vagrantfile # never leave home without it
+-- etc
| +-- config.json # my main configuration file
+-- api
| +-- <model>.py # RESTful routes for each model
+-- 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
| +-- <dependency> # Include ALL the dependencies locally
+-- env # virtualenv for "fat" dependencies
+-- puppet # Puppet manifests and deployment stuff
+-- models
| +-- db.py # Base models and database initialisation
| +-- <store>.py # Other data stores (Redis, etc.)
+-- batch # Celery tasks
| +-- <worker>.py # Separate modules per worker, if needed
+-- static # Static assets for HTML and sundry
| +-- css
| | +-- ink.css # I love it
| +-- js
| | +-- app.js # Everything starts here
| | +-- ink-all.js # Our in-house library
| | +-- knockout.js # I love data binding
| | +-- zepto.js # I hate jQuery
| +-- img
| +-- font # Usually Roboto
+-- views
+-- layout.tpl # Base layout for templates
+-- <group> # Partials for each entity/screen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment