question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add support for globs to `bokeh serve`

See original GitHub issue

I have been working on a way to make it easier to use panel serve to launch deployments at a proxied port on jupyter notebook calls, so that your deployment shows up at localhost:8888/panel. I’ve got this working for cases where you have a dir with one notebook in it called main.ipynb, but I’d like to have it look at all the notebooks and generate an index. This would be equivalent to calling panel serve *.ipynb but using a flag instead. The reason for the flag is that it isn’t possible to pass the * in the proxy code:

'command': ["panel", "serve", ".", "--allow-websocket-origin=*", "--port", "{port}", "--prefix", "{base_url}panel"],

For context this functionality would make it very easy to deploy apps on binder. The user would just need to include jupyter-panel-proxy in their env and stick ?urlpath=panel at the end of the binder url.

These are the relevant PRs:

If we were able to add the --all-notebooks flag, then I’d be happy to write a jupyter-bokeh-proxy as well 😃

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
jsignellcommented, Sep 5, 2019

Ah sorry yes that is true. Ok I am good with the suggestion.

0reactions
bryevdvcommented, Sep 5, 2019

that changes the default behavior on a feature that we are using in long-lived projects. Is that really preferable?

I don’t think it does? Currently we always get shell globbing for

bokeh serve *.py

And we always will—we have no ability to affect or turn off shell globbing. My understanding of this issue is that it is desirable that (effectively) this also work:

bokeh serve '*.py'  

for cases when this might arise (e.g. calling a subprocess without shell=True) But that it does not currently work. So the proposal (as I understand it) it to allow

bokeh serve --glob '*.py'  

which would do globbing manually when:

  • the --glob flag is passed
  • the arg that is passed has a literal * in it

This would not affect normal command line usage AFAICT, but would allow globs passed in subprocess calls to behave as expected.

Read more comments on GitHub >

github_iconTop Results From Across the Web

serve — Bokeh 3.0.3 Documentation
Another way to run multiple applications is using glob notation to indicate that all the files matching a particular pattern should be served....
Read more >
bokeh/command/subcommands/serve.py
As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Python source code syntax ...
Read more >
bokeh Changelog - pyup.io
9209 [component: server] Add support for globs to `bokeh serve` - 9241 Add 256-color palettes, add a function to generate diverging palettes
Read more >
Bokeh run service as daemon
However, I want to run bokeh as a daemon so I can close the terminal and let the app run as a service...
Read more >
Interactive Data Visualization using Bokeh (in Python)
Bokeh provides you output in various medium like html, notebook and server; We can also embed Bokeh visualization to flask and django app;...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found