Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the doc of web.Application #2081

Merged
merged 1 commit into from
Jul 12, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changes/2081.doc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Update the doc of web.Application
29 changes: 22 additions & 7 deletions docs/web_reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1157,23 +1157,36 @@ properties for later access from a :ref:`handler<aiohttp-web-handler>` via the
Although :class:`Application` is a :obj:`dict`-like object, it can't be
duplicated like one using :meth:`Application.copy`.

.. class:: Application(*, router=None, logger=<default>, \
middlewares=(), debug=False, **kwargs)
.. class:: Application(*, logger=<default>, router=None,middlewares=(), \
handler_args=None, client_max_size=1024**2, \
secure_proxy_ssl_header=None, loop=None, debug=...)

The class inherits :class:`dict`.

:param router: :class:`aiohttp.abc.AbstractRouter` instance, the system
creates :class:`UrlDispatcher` by default if
*router* is ``None``.

:param logger: :class:`logging.Logger` instance for storing application logs.

By default the value is ``logging.getLogger("aiohttp.web")``

:param router: :class:`aiohttp.abc.AbstractRouter` instance, the system
creates :class:`UrlDispatcher` by default if
*router* is ``None``.

:param middlewares: :class:`list` of middleware factories, see
:ref:`aiohttp-web-middlewares` for details.

:param debug: Switches debug mode.
:param handler_args: dict-like object that overrides keyword arguments of
:meth:`Application.make_handler`

:param client_max_size: client's maximum size in a request. If a POST
request exceeds this value, it raises an
`HTTPRequestEntityTooLarge` exception.

:param tuple secure_proxy_ssl_header: Default: ``None``.

.. deprecated:: 2.1

See ``request.url.scheme`` for built-in resolution of the current
scheme using the standard and de-facto standard headers.

:param loop: event loop

Expand All @@ -1182,6 +1195,8 @@ duplicated like one using :meth:`Application.copy`.
The parameter is deprecated. Loop is get set during freeze
stage.

:param debug: Switches debug mode.

.. attribute:: router

Read-only property that returns *router instance*.
Expand Down