GNUnet  0.20.0
httpdomain.autohttp.tornado Namespace Reference

Data Structures

class  AutoTornadoDirective
 

Functions

def translate_tornado_rule (app, rule)
 
def get_routes (app)
 
def normalize_path (path)
 
def setup (app)
 

Detailed Description

    sphinxcontrib.autohttp.tornado
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

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

    :copyright: Copyright 2013 by Rodrigo Machado
    :license: BSD, see LICENSE for details.

Function Documentation

◆ translate_tornado_rule()

def httpdomain.autohttp.tornado.translate_tornado_rule (   app,
  rule 
)

Definition at line 31 of file tornado.py.

31 def translate_tornado_rule(app, rule):
32  buf = six.StringIO()
33  for name, filter, conf in app.router.parse_rule(rule):
34  if filter:
35  buf.write('(')
36  buf.write(name)
37  if filter != app.router.default_filter or conf:
38  buf.write(':')
39  buf.write(filter)
40  if conf:
41  buf.write(':')
42  buf.write(conf)
43  buf.write(')')
44  else:
45  buf.write(name)
46  return buf.getvalue()
47 
48 
def translate_tornado_rule(app, rule)
Definition: tornado.py:31

◆ get_routes()

def httpdomain.autohttp.tornado.get_routes (   app)

Definition at line 49 of file tornado.py.

49 def get_routes(app):
50  for spec in app.handlers[0][1]:
51  handler = spec.handler_class
52  doc_methods = list(handler.SUPPORTED_METHODS)
53  if 'HEAD' in doc_methods:
54  doc_methods.remove('HEAD')
55  if 'OPTIONS' in doc_methods:
56  doc_methods.remove('OPTIONS')
57 
58  for method in doc_methods:
59  maybe_method = getattr(handler, method.lower(), None)
60  if (inspect.isfunction(maybe_method) or
61  inspect.ismethod(maybe_method)):
62  yield method.lower(), spec.regex.pattern, handler
63 
64 
static int list
Set if we should print a list of currently running services.
Definition: gnunet-arm.c:69

References list.

Referenced by httpdomain.autohttp.tornado.AutoTornadoDirective.make_rst().

Here is the caller graph for this function:

◆ normalize_path()

def httpdomain.autohttp.tornado.normalize_path (   path)

Definition at line 65 of file tornado.py.

65 def normalize_path(path):
66  if path.endswith('$'):
67  path = path[:-1]
68  return path
69 
70 

Referenced by httpdomain.autohttp.tornado.AutoTornadoDirective.make_rst().

Here is the caller graph for this function:

◆ setup()

def httpdomain.autohttp.tornado.setup (   app)

Definition at line 125 of file tornado.py.

125 def setup(app):
126  if 'http' not in app.domains:
127  httpdomain.setup(app)
128  app.add_directive('autotornado', AutoTornadoDirective)