Skip to content

Commit

Permalink
Add async functions to API docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
Dreamsorcerer committed Nov 15, 2020
1 parent 27e28a7 commit cf4c846
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions docs/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,17 @@ Simple initialization::
to `aiohttp_jinja2_environment`.


.. function:: async render_string_async(template_name, request, context, *, \
app_key=APP_KEY)

Async version of ``render_string()``.

Replaces ``render_string()`` when ``enable_async=True`` is passed to the
``setup()`` call.

See ``render_string()`` for parameter usage.


.. function:: render_template(template_name, request, context, *, \
app_key=APP_KEY, encoding='utf-8', status=200)

Expand All @@ -119,6 +130,18 @@ Simple initialization::
:param int status: http status code that will be set on resulting response.


.. function:: async render_template_async(
template_name, request, context, *, \
app_key=APP_KEY, encoding='utf-8', status=200)
Async version of ``render_template()``.

Replaces ``render_template()`` when ``enable_async=True`` is passed to the
``setup()`` call.

See ``render_template()`` for parameter usage.


Example of usage
^^^^^^^^^^^^^^^^
Assuming the initialization from the example above has been done::
Expand Down

0 comments on commit cf4c846

Please sign in to comment.