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: Make request parameter not needed #183

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

rgryta
Copy link

@rgryta rgryta commented Jan 28, 2024

During a project I've encountered a need to retrieve a Request object from fastapi - but didn't want to put the limitation on the user to add the Request parameter manually every single time when it's unnecessary.

As such, I've created a decorator that forces adds a [request: Request] to the function's signature if it's not there already. Before the final function is executed - the request is removed from args/kwargs.

Let me know if this is even something that people here would like to have (or not).

@rgryta rgryta changed the title Make request parameter not needed feat: Make request parameter not needed Jan 28, 2024
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.

None yet

1 participant