-
-
Notifications
You must be signed in to change notification settings - Fork 644
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
[Feature Request] Uvicorn integration #204
Comments
Hi @alimcmaster1. The execution model is one of the areas where Hydra is not very flexible right now. I suggest that you try using Hydra with Uvicorn for a while (even if the integration is not clean) to see what works well and what doesn't work well before we start thinking about what needed to be changed in Hydra to support this better. |
Generally speaking, Hydra is lower level than traditional frameworks. I do not have a good mental model of Uvicorn right now. Beyond configuring itself, does Uvicorn cocerns itself at all with how the user's web server would configure itself? In your example, what I am not seeing is how you use Hydra's config to configure Uvicorn and how you are using it to configure the behavior of the actual app. |
@hydra.compose API that is planned in #219 might be helpful here. |
directus-api looks like a pretty solid example of an integration between Hydra and Uvicorn. |
#219 is now landed (and is available in the Hydra 0.11). I ended up with an experimental API to perform composition. It would be great if anyone interested in Uvicorn and Hydra contribute a minimal and educational example of how they think is a good way to integrate them. |
Closing, this should be possible via the compose API or following the example I pointed to. |
🚀 Feature Request
Firstly thank you for open sourcing this - documentation is excellent too!.
Motivation
Often ASGI/WSGI python webserver frameworks are launched with their own wrapper module such as gunicorn, uvicorn and hypercorn.
Example as per the uvicorn quickstart guide.
(note the run command:
uvicorn example:app
)The uvicorn command then runs this main module.
If one wishes to use hydra for configuration management in the uvicorn examples they would need to rewrite some code from the above module perhaps:
Pitch
Describe the solution you'd like
A very open ended question but what are peoples thoughts on developing a way to make these libraries work together
Goals:
Are you willing to open a pull request?
cc. @tomchristie
The text was updated successfully, but these errors were encountered: