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

feat: override dependency with a Depends #64

Open
adriangb opened this issue Feb 12, 2022 · 2 comments
Open

feat: override dependency with a Depends #64

adriangb opened this issue Feb 12, 2022 · 2 comments

Comments

@adriangb
Copy link
Owner

app.dependency_overrides[...] = Depends(...)
@adriangb adriangb changed the title feat: inject a Depends feat: override dependency with a Depends Feb 12, 2022
@adriangb
Copy link
Owner Author

Maybe the other way around as well:

x = Annotated[..., Depends(...)]
app.dependency_overrides[x] = ...

@adriangb
Copy link
Owner Author

These would be easy to implement, and I can envision some scenarios in which they would be useful, but I will wait to collect concrete use cases before implementing

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

No branches or pull requests

1 participant