-
-
Notifications
You must be signed in to change notification settings - Fork 22
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
Add FastAPI integration #30
Conversation
68b185e
to
3475083
Compare
Maybe the FastAPI expert himself @Kludex? |
Every FastAPI expert is welcome; I'm not in the know enough to @ spam them all 🐶 💛 |
@michaeloliverx used "the" because I advertise myself as such: https://www.fastapiexpert.com/ I can take a look tonight. |
Awesome thanks! |
And @Kludex IS the current top official FastAPI Expert: https://fastapi.tiangolo.com/fastapi-people/#experts 😎 |
I haven't used svcs, but checking mainly the examples they look great! I think it's all good from the FastAPI point of view. One small thing I would do, mainly just syntax sugar, as this seems like it would be a common pattern: def do_stuff(
svcs: Annotated[svcs.Container, Depends(svcs.fastapi.container)],
):
... In DepContainer = Annotated[svcs.Container, Depends(svcs.fastapi.container)] And then in user's code they could do: from svcs.fastapi import DepContainer
def do_stuff(
svcs: DepContainer,
):
... ...one of the big reasons to support I would maybe also comment in the docs that both things are equivalent. But just provide that type alias for extra niceness. ✨ |
Nobody has except me. 🤓 There's still a fat warning that every release is a breaking release and it's basically an internal project that I'm trying to make fit for the public. And to make sure I don't paint myself into a corner, I'm trying to implement idiomatic integrations for all common web frameworks (starlette is next, but I believe it's just recycling of It's been a hectic month, but I'm starting to see the light at the end of the tunnel
Good to hear!
Ah that’s cool, this is exactly the feedback I’ve been hoping for – thank you so much! |
Co-authored-by: Sebastián Ramírez <[email protected]>
So I've done this mostly blindly by trawling the FastAPI docs… it would be great if some FastAPI expert could give me feedback if this makes conceptually sense, or if I've got something fundamentally wrong. @tiangolo maybe? 😇