Skip to content

Invoking in a serverless context #1827

Answered by RobbeSneyders
drewpearce asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @drewpearce,

Connexion now implements the ASGI interface, which is a Python interface that can be called directly. You'll probably need some boilerplate to encode your invocation event into the ASGI scope and channels though. This is what werkzeug.wrappers.Response.from_app provides for WSGI, but I'm not aware of any equivalent functionality for ASGI.

I think the most logical place to add this in the ASGI ecosystem, would be in Starlette, or otherwise asgiref. Starlette already offers most of the needed functionality as part of its TestClient, but not with the interface you're looking for.

For a long term fix, I would propose that you open a discussion on the Starlette repo to check if…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@drewpearce
Comment options

Answer selected by drewpearce
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants