MCPcopy Index your code
hub / github.com/fluentpython/example-code-2e / add_route

Method add_route

21-async/mojifinder/bottle.py:775–780  ·  view source on GitHub ↗

Add a route object, but do not change the :data:`Route.app` attribute.

(self, route)

Source from the content-addressed store, hash-verified

773 return urljoin(urljoin('/', scriptname), location)
774
775 def add_route(self, route):
776 ''' Add a route object, but do not change the :data:`Route.app`
777 attribute.'''
778 self.routes.append(route)
779 self.router.add(route.rule, route.method, route, name=route.name)
780 if DEBUG: route.prepare()
781
782 def route(self, path=None, method='GET', callback=None, name=None,
783 apply=None, skip=None, **config):

Callers 2

mergeMethod · 0.95
decoratorMethod · 0.95

Calls 3

addMethod · 0.80
appendMethod · 0.45
prepareMethod · 0.45

Tested by

no test coverage detected