-
-
Notifications
You must be signed in to change notification settings - Fork 519
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
Add ability to define custom tornado handler plugins #2752
base: main
Are you sure you want to change the base?
Conversation
fbbd6e3
to
7f20d2d
Compare
pre-commit.ci autofix |
for more information, see https://pre-commit.ci
Codecov Report
@@ Coverage Diff @@
## main #2752 +/- ##
==========================================
+ Coverage 73.56% 82.65% +9.08%
==========================================
Files 237 237
Lines 34292 34366 +74
==========================================
+ Hits 25228 28405 +3177
+ Misses 9064 5961 -3103
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Is it possible to add and remove the handlers dynamically? How does this compare to the REST API already supported? Can a user use Async? How? I would probably prefer that. How to get this to scale? Now you have Panel on web socket where you probable use num-procs and/ or num-threads? What about oauth? Jwt tokens? Swagger api docs? Would it be possible and better to build on FastApi? |
Not with this PR no.
This will let you build generic endpoints to do whatever you want unlike the REST functionality which is much more limited.
Tornado handler HTTP methods like
When using num-procs this endpoint will be duplicated across processes and the requests will be routed just like any other request.
If you've enabled authentication adding the @authenticated decorator will put the endpoint behind OAuth.
If someone decides to reimplement the entire Bokeh server functionality on top of FastAPI I'd be very happy but I'd estimate that would take me 1-2 months. |
plugin_module = importlib.import_module(plugin) | ||
except ModuleNotFoundError: | ||
import pdb | ||
pdb.set_trace() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove
Allows defining custom Tornado handler plugins via the
panel serve
CLI.