GNUnet 0.22.2
httpdomain.autohttp.bottle Namespace Reference

Data Structures

class  AutobottleDirective
 

Functions

def translate_bottle_rule (app, rule)
 
def get_routes (app)
 
def setup (app)
 

Detailed Description

    sphinxcontrib.autohttp.bottle
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    The sphinx.ext.autodoc-style HTTP API reference builder (from Bottle)
    for sphinxcontrib.httpdomain.

    :copyright: Copyright 2012 by Jameel Al-Aziz
    :license: BSD, see LICENSE for details.

Function Documentation

◆ translate_bottle_rule()

def httpdomain.autohttp.bottle.translate_bottle_rule (   app,
  rule 
)

Definition at line 30 of file bottle.py.

30def translate_bottle_rule(app, rule):
31 buf = six.StringIO()
32 if hasattr(app.router, "parse_rule"):
33 iterator = app.router.parse_rule(rule) # bottle 0.11
34 else:
35 iterator = app.router._itertokens(rule) # bottle 0.12
36 for name, filter, conf in iterator:
37 if filter:
38 buf.write('(')
39 buf.write(name)
40 if (filter != app.router.default_filter and filter != 'default')\
41 or conf:
42 buf.write(':')
43 buf.write(filter)
44 if conf:
45 buf.write(':')
46 buf.write(conf)
47 buf.write(')')
48 else:
49 buf.write(name)
50 return buf.getvalue()
51
52
def translate_bottle_rule(app, rule)
Definition: bottle.py:30

Referenced by httpdomain.autohttp.bottle.get_routes().

Here is the caller graph for this function:

◆ get_routes()

def httpdomain.autohttp.bottle.get_routes (   app)

Definition at line 53 of file bottle.py.

53def get_routes(app):
54 for route in app.routes:
55 path = translate_bottle_rule(app, route.rule)
56 yield route.method, path, route
57
58

References httpdomain.autohttp.bottle.translate_bottle_rule().

Referenced by httpdomain.autohttp.bottle.AutobottleDirective.make_rst().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setup()

def httpdomain.autohttp.bottle.setup (   app)

Definition at line 110 of file bottle.py.

110def setup(app):
111 if 'http' not in app.domains:
112 httpdomain.setup(app)
113 app.add_directive('autobottle', AutobottleDirective)
114

Referenced by GNUNET_IDENTITY_ego_get_anonymous().

Here is the caller graph for this function: