HTTP Server / Web application controller
Find a file
2015-09-24 14:56:51 -04:00
docs Add application shutdown callbacks. 2015-09-24 14:56:51 -04:00
requires Fix requirements management. 2015-07-23 09:14:14 -04:00
sprockets Add application shutdown callbacks. 2015-09-24 14:56:51 -04:00
.gitignore Development tool configuration. 2015-07-22 14:01:24 -04:00
.travis.yml Enable Travis container infrastructure. 2015-07-23 07:41:20 -04:00
LICENSE Add sprockets.http.run. 2015-07-22 14:11:32 -04:00
MANIFEST.in Add documentation 2015-07-22 13:40:55 -04:00
README.rst Add documentation 2015-07-22 13:40:55 -04:00
setup.cfg Development tool configuration. 2015-07-22 14:01:24 -04:00
setup.py Fix requirements management. 2015-07-23 09:14:14 -04:00
tox.ini Development tool configuration. 2015-07-22 14:01:24 -04:00

sprockets.http
==============
This library runs Tornado HTTP server applications intelligently.

* ``SIGTERM`` is gracefully handled with respect to outstanding timeouts
  and callbacks
* Listening port is configured by the ``PORT`` environment variable
* ``logging`` layer is configured to output JSON by default
* *"Debug mode"* is enabled by the ``DEBUG`` environment variable

  - makes log out human-readable
  - catches ``SIGINT`` (e.g., ``Ctrl+C``)
  - application run in a single process

Example Usage
-------------

.. code-block:: python

   from tornado import web
   import sprockets.http

   
   def make_app(**settings):
       return web.Application([
          # insert your handlers
       ], **settings)


   if __name__ == '__main__':
       sprockets.http.run(make_app)