code stringlengths 3 6.57k |
|---|
join(sorted(allowed) |
HTTPError(405, "Method not allowed.", Allow=allow_header) |
HTTPError(404, "Not found: " + repr(path) |
Route(object) |
string (e.g. ``/wiki/<page>``) |
string (e.g. ``GET``) |
route (if specified) |
plugins (see :meth:`Bottle.route`) |
route (see :meth:`Bottle.route`) |
ConfigDict() |
load_dict(config) |
call(self) |
self._make_callback() |
reset(self) |
self.__dict__.pop('call', None) |
prepare(self) |
immediately (useful for debugging) |
all_plugins(self) |
set() |
reversed(self.app.plugins + self.plugins) |
getattr(p, 'name', False) |
and (name in self.skiplist or name in unique) |
type(p) |
unique.add(name) |
_make_callback(self) |
self.all_plugins() |
hasattr(plugin, 'apply') |
plugin.apply(callback, self) |
plugin(callback) |
self._make_callback() |
update_wrapper(callback, self.callback) |
get_undecorated_callback(self) |
getattr(func, '__func__' if py3k else 'im_func', func) |
hasattr(func, closure_attr) |
getattr(func, closure_attr) |
getattr(func, closure_attr) |
get_callback_args(self) |
callback (most likely) |
getargspec(self.get_undecorated_callback() |
get_config(self, key, default=None) |
in (self.config, self.app.conifg) |
__repr__(self) |
self.get_undecorated_callback() |
Bottle(object) |
true (default) |
__init__(self, catchall=True, autojson=True) |
ConfigDict() |
functools.partial(self.trigger_hook, 'config') |
self.config.meta_set('autojson', 'validate', bool) |
self.config.meta_set('catchall', 'validate', bool) |
ResourceManager() |
Router() |
self.install(JSONPlugin() |
self.install(TemplatePlugin() |
DictProperty('config', 'catchall') |
_hooks(self) |
dict((name, []) |
add_hook(self, name, func) |
insert(0, func) |
append(func) |
remove_hook(self, name, func) |
remove(func) |
trigger_hook(self, __name, *args, **kwargs) |
hook(*args, **kwargs) |
hook(self, name) |
decorator(func) |
self.add_hook(name, func) |
mount(self, prefix, app, **options) |
application (:class:`Bottle` or plain WSGI) |
root_app.mount('/admin/', admin_app) |
prefix.split('/') |
ValueError('Empty path prefix.') |
len(segments) |
mountpoint_wrapper() |
request.path_shift(path_depth) |
HTTPResponse([]) |
start_response(status, headerlist, exc_info=None) |
_raise(*exc_info) |
rs.add_header(name, value) |
app(request.environ, start_response) |
itertools.chain(rs.body, body) |
request.path_shift(-path_depth) |
options.setdefault('skip', True) |
options.setdefault('method', 'PROXY') |
options.setdefault('mountpoint', {'prefix': prefix, 'target': app}) |
self.route('/%s/<:re:.*>' % '/'.join(segments) |
prefix.endswith('/') |
self.route('/' + '/'.join(segments) |
merge(self, routes) |
isinstance(routes, Bottle) |
self.add_route(route) |
install(self, plugin) |
hasattr(plugin, 'setup') |
plugin.setup(self) |
callable(plugin) |
hasattr(plugin, 'apply') |
TypeError("Plugins must be callable or implement .apply() |
self.plugins.append(plugin) |
self.reset() |
uninstall(self, plugin) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.