Bottle Utils documentation¶
Bottle Utils (package name bottle-utils
) is a collection of decorators,
functions and classes that address typical problems developing web sites and
applications using Bottle framework. This package is created based on code
we use at Outernet for various user-facing interfaces as well as our own
sites.
Bottle Utils are compatible with Python 2.7, 3.3, and 3.4. Compatibility with other versions of Python is possible, but not tested. It targets latest stable release of Bottle.
Installation¶
Use one of the following commands to install Bottle Utils:
pip install bottle-utils
easy_install bottle-utils
Note
Between versions 0.3 and 0.5, bottle-utils package was split into multiple packages. Packages were structured in a way that allowed the API prior to version 0.3 to work without issues. However, this has caused various problems with deployment and development, and the approach was subsequently abandoned. Starting with version 0.5, Bottle Utils is again a monolithic package.
Source code¶
The complete source code is licensed under BSD license (see LICENSE
file in
the source package), and available on GitHub.
Package contents¶
The following functionality is available:
- Common utilities (
bottle_utils.common
) - AJAX (
bottle_utils.ajax
) - CSRF protection (
bottle_utils.csrf
) - Flash messages (
bottle_utils.flash
) - Template helpers (
bottle_utils.html
) - Form handling and validation (
bottle_utils.form
) - HTTP helpers (
bottle_utils.http
) - Translation support (
bottle_utils.i18n
) - Lazy evaluation (
bottle_utils.lazy
) - Social metadata (
bottle_utils.meta
)