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

Starlette support #1431

Closed
wants to merge 30 commits into from
Closed

Starlette support #1431

wants to merge 30 commits into from

Conversation

arkkors
Copy link
Contributor

@arkkors arkkors commented Oct 3, 2021

Fixes #496 .

Changes proposed in this pull request:

  • Add support for the Starlette framework to Connexion
  • Add support to serve the API using the uvicorn ASGI server

@arkkors arkkors marked this pull request as ready for review October 4, 2021 10:37
@arkkors
Copy link
Contributor Author

arkkors commented Oct 4, 2021

This is still rough around the edges, but would welcome a first review

@arkkors arkkors changed the title WIP: Starlette support Starlette support Oct 4, 2021
@Ruwann Ruwann self-requested a review October 7, 2021 06:40
@arkkors
Copy link
Contributor Author

arkkors commented Nov 2, 2021

Any progress on this?

docs/quickstart.rst Outdated Show resolved Hide resolved
connexion/apis/starlette_api.py Outdated Show resolved Hide resolved
)
endpoint_name = f"{self._api_name}_not_found"
self.subapp.add_route(
path="/{not_found_path}",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the intention here? Shouldn't we be using exception handlers?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried to diverge as little as possible from the aiohttp implementation, but this can be changed. Will look at it tomorrow

connexion/apis/starlette_api.py Show resolved Hide resolved
connexion/apps/starlette_app.py Outdated Show resolved Hide resolved
@RobbeSneyders
Copy link
Member

Hi @arkkors,

Thanks for the PR and sorry for the late response. Unfortunately, we've decided to go for another framework agnostic approach (see #1395 (comment)).

I was able to reuse some of your code for this though, so I added you as a co-author to #1496. I hope this is ok for you, let me know if it isn't.

@RobbeSneyders
Copy link
Member

Connexion 3.0 will support ASGI frameworks out of the box (and is now built on top of Starlette). See #1395

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for sanic/starlette framework or async/await
3 participants