Request object missing in parameters?
Created by: marcvs
Description
For use with flaat, the request object of aiohttp needs to be passed along as the first unnamed parameter. I find this in my examples of flaat (see fix-aio-problems branch) but nowhere in deepaas api.
Steps to Reproduce
define a predict function like this:
@flaat.login_required() # Require only authorized people to do training
def predict(*args, **kwargs):
logger.error("starting predict")
print(F"predict: got {len(args)} args")
for arg in args:
print(F" arg: {arg}")
print(F"predict: got {len(kwargs)} kwargs")
for arg in kwargs:
print(F" kwarg: {arg}: {kwargs[arg]}")
And obser the output. Expected is to see a line like:
arg <Request GET /valid_user_no_args >
...
Versions
1.3.0