web_response

Module Contents

Classes

ContentCoding()
StreamResponse(self)
Response(self)

Functions

json_response(data=sentinel)
class ContentCoding
class StreamResponse
__init__()
prepared()
task()
status()
chunked()
compression()
reason()
set_status(status, reason=None, _RESPONSES=RESPONSES)
keep_alive()
force_close()
body_length()
output_length()
enable_chunked_encoding(chunk_size=None)

Enables automatic chunked transfer encoding.

enable_compression(force=None)

Enables response compression encoding.

headers()
cookies()

Set or update response cookie.

Sets new cookie or updates existent with new value. Also updates only those params which are not None.

Delete cookie.

Creates new empty expired cookie.

content_length()
content_length(value)
content_type()
content_type(value)
charset()
charset(value)
last_modified(_LAST_MODIFIED=None)

The value of Last-Modified HTTP header, or None.

This header is represented as a datetime object.

last_modified(value)
_generate_content_type_header(CONTENT_TYPE=None)
_do_start_compression(coding)
_start_compression(request)
prepare(request)
_start(request, HttpVersion10=HttpVersion10, HttpVersion11=HttpVersion11, CONNECTION=None, DATE=None, SERVER=None, CONTENT_TYPE=None, CONTENT_LENGTH=None, SET_COOKIE=None, SERVER_SOFTWARE=SERVER_SOFTWARE, TRANSFER_ENCODING=None)
write(data)
drain()
write_eof(data=None)
__repr__()
__getitem__(key)
__setitem__(key, value)
__delitem__(key)
__len__()
__iter__()
__hash__()
class Response
__init__()
body()
body(body, CONTENT_TYPE=None, CONTENT_LENGTH=None)
text()
text(text)
content_length()
content_length(value)
write_eof()
_start(request)
_do_start_compression(coding)
json_response(data=sentinel)