luna_lambda_tools.public.standalone.standalone_request.StandaloneLambdaRequest
- final class luna_lambda_tools.public.standalone.standalone_request.StandaloneLambdaRequest(*args, **kwargs)[source]
Standalone lambda request
- __init__(*args, **kwargs)
Methods
__init__
(*args, **kwargs)generate_id
(*_)Generate a unique ID for the request.
getBody
()Get body from request
get_args
([keep_blank_values, ...])Get query arguments. Overload default keep_blank_values :type keep_blank_values:
bool
:param keep_blank_values: flag indicating whether blank values in percent-encoded queries should be treated as blank strings :type strict_parsing:bool
:param strict_parsing: flag indicating what to do with parsing errors :type encoding:str
:param encoding: specify how to decode percent-encoded sequences :type errors:str
:param errors: specify how to decode percent-encoded sequences.get_cookies
()- rtype:
RequestParameters
get_current
()Retrieve the current request object
get_form
([keep_blank_values])Method to extract and parse the form data from a request.
get_query_args
([keep_blank_values, ...])Parse query_string using urllib.parse.parse_qsl.
load_json
([loads])Load the request body as JSON
make_context
()Create a new context object.
receive_body
()Receive request.body, if not already received.
reset_response
()Reset the response object.
respond
([response, status, headers, ...])Respond to the request without returning.
sendToMonitoring
(points)Send point to monitoring
url_for
(view_name, **kwargs)Retrieve a URL for a given view name.
Attributes
requestId
dataForMonitoring
startRequestTimeCheckPoint
startRequestTime
error
streamResponse
accept
Accepted response content types.
app
appCtx
Get app context
args
Get query arguments.
beautyRoute
Get request beauty route :returns: beauty uri template
body
bodySampleStoreEnabled
Whether body sample store is enabled
charset
The value of charset part for Content-Type HTTP header.
client_ip
Client IP address.
clients
config
Get application config.
conn_info
content_type
The value of content part for Content-Type HTTP header.
cookies
Incoming cookies on the request
credentials
Attempt to return the auth header value.
ctx
The current request context.
endpoint
Alias of sanic.request.Request.name
eventsEnabled
Whether luna-event is enabled
faceSampleStoreEnabled
Whether face sample store is enabled
files
The request body parsed as uploaded files
form
The request body parsed as form data
forwarded
Active proxy information obtained from request headers, as specified in Sanic configuration.
handlersEnabled
Whether handlers is enabled
head
headers
host
port).
id
A request ID passed from the client, or generated from the backend.
imageOriginStoreEnabled
Whether image origin store is enabled
ip
Peer ip of the socket
is_cacheable
Whether the HTTP method is cacheable.
is_idempotent
Whether the HTTP method is iempotent.
is_safe
Whether the HTTP method is safe.
json
Get json from request
logger
lvaEnabled
Whether Luna-Video-Agent is enabled
match_info
Matched path parameters after resolving route
method
name
The route name
network_paths
Access the network paths if available
parsed_accept
parsed_args
parsed_cookies
parsed_credentials
parsed_files
parsed_form
parsed_forwarded
parsed_json
parsed_not_grouped_args
parsed_token
path
Path of the local HTTP request
port
Peer port of the socket
protocol
The HTTP protocol instance
query_args
Parse query_string using urllib.parse.parse_qsl.
query_string
Representation of the requested query
raw_headers
The unparsed HTTP headers
raw_url
remote_addr
Client IP address, if available from proxy.
request_line
The first line of a HTTP request
responded
route
scheme
Determine request scheme.
scope
The ASGI scope of the request.
senderEnabled
Whether sender is enabled
server_name
hostname the client connected to, by request.host
server_path
Full path of current URL; uses proxied or local path
server_port
The port the client connected to, by forwarded port or request.host.
socket
Information about the connected socket if available
stream
stream_id
Access the HTTP/3 stream ID.
token
Attempt to return the auth header token.
transport
uri_template
The defined URI template
url
The URL
version
accountId