FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix: removed inject decorator provided by dependency_injector by XyLearningProgramming · Pull Request #24 · pgorecki/python-ddd · GitHub

fix: removed inject decorator provided by dependency_injector - #24

Open
XyLearningProgramming wants to merge 1 commit into
pgorecki:mainfrom
XyLearningProgramming:fix/remove_inject
Open

fix: removed inject decorator provided by dependency_injector#24
XyLearningProgramming wants to merge 1 commit into
pgorecki:mainfrom
XyLearningProgramming:fix/remove_inject

Conversation

Copy link
Copy Markdown

Thank you for your amazing project showing an example of ddd pattern.

I found that the @injector decorators are actually not in use. For usages like Annotated[Application, Depends(get_application)], it is FastAPI that solves dependencies by calling this func directly: source code here.

If you'd like to use dependency-injector directly with FastAPI, according to this doc, the dependent should be formalized with dependency_injector.Provide as Depends(Provide[ApplicationContainer.application]) or Depends(Provide["application"]).

This PR removed @injector decorators.

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

1 participant


Back | FazBrowse Home | New Git URL