Dynamic endpoint function signature
See original GitHub issueHi,
Is it possible to create an endpoint from a dict of parameters, something like:
params = {"param1": int, "param2": str }
@app.get("/root")
def root(**params):
pass
?
(the above doesn’t work, the docs for example say that root takes one parameter called params
)
Thank you! Marco
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Dynamic function signature in help() - python
This works so far. However, I would like to set the method signature shown with help(proxy) dynamically. It would increase the user interface ......
Read more >Support for Dynamic REST Endpoints
The REST Adapter enables you to dynamically change the (invoke) outbound endpoint configuration. This feature is useful in the following scenarios:
Read more >Dynamic Outlook Email Signature Using with Intune ...
In this blog post we will be get familiar with a somewhat novel idea that proactive remediation's can be used for. Which, as...
Read more >Routing & Input
An incoming HTTP request must be “routed” to one or more R functions. Plumber has two distinct families of functions that it handles:...
Read more >Dynamic Custom Apps | Help Scout Developers
Dynamic Apps require two things in order to function properly: ... Help Scout uses this secret key to generate a signature for each...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Here’s a solution with @Mause suggestion:
Thanks both!
I suggest you look at the makefun library, it works quite well for this use
https://pypi.org/project/makefun/