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

allow MethodResolver and MethodViewResolver #1563

Closed
bluebrown opened this issue Jul 3, 2022 · 0 comments · Fixed by #1564
Closed

allow MethodResolver and MethodViewResolver #1563

bluebrown opened this issue Jul 3, 2022 · 0 comments · Fixed by #1564

Comments

@bluebrown
Copy link
Contributor

It would be nice to have both:

  • a MethodResolver that works with any class
  • a MethodViewResolver that works specifically with flasks method views

In both cases, the class args and kwargs should be passed inside the resolver to allow for dependency injection.

Perhaps somewhere it should be documented that for the MethodResolver a single instance is used across all requests while with the MethodViewResolver, as the result of the as_view behaviour, a new instance is created for each request. This could help to avoid pitfall regarding thread safety.

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 a pull request may close this issue.

1 participant