From 2c3a3b2e17babb033fe3c5a4711a9edf32bf7c4d Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Fri, 12 Oct 2018 07:02:35 -0400 Subject: [PATCH] docstrings --- responder/api.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/responder/api.py b/responder/api.py index 5d37173..317ab64 100644 --- a/responder/api.py +++ b/responder/api.py @@ -314,6 +314,7 @@ class API: Note: The current ``api`` instance is always passed into the view. + :param s: The template to use. :param auto_escape: If ``True``, HTML and XML will automatically be escaped. :param values: Data to pass into the template. """ @@ -334,6 +335,14 @@ class API: return template.render(**values) def run(self, address=None, port=None, **kwargs): + """Runs the application with Waitress. If the ``PORT`` environment + variable is set, requests will be served on that port automatically to all + known hosts. + + :param address: The address to bind to. + :param port: The port to bind to. If none is provided, one will be selected at random. + :param kwargs: Additional keyword arguments to send to ``waitress.serve()``. + """ if "PORT" in os.environ: if address is None: address = "0.0.0.0"