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

Request object missing in parameters? #92

Open
marcvs opened this issue Aug 7, 2020 · 0 comments
Open

Request object missing in parameters? #92

marcvs opened this issue Aug 7, 2020 · 0 comments
Labels
bug Something isn't working

Comments

@marcvs
Copy link

marcvs commented Aug 7, 2020

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

@alvarolopez alvarolopez self-assigned this Aug 21, 2020
@alvarolopez alvarolopez added the bug Something isn't working label Aug 21, 2020
@alvarolopez alvarolopez removed their assignment Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants