`panel serve` vs `pn.serve`: Equivalent to `--reuse-sessions` and `--global-loading-spinner` for `pn.serve`

Most of options of the panel serve CLI command have their equivalents as parameters in pn.serve method. It is not always one-to-one mapping, as in the case of --index.

However, I have not found how to call pn.serve with equivalents of the following panel serve options:

  • --reuse-sessions: Whether to reuse sessions when serving the initial request.
  • --global-loading-spinner: Whether to add a global loading spinner to the application(s).

From my experience, I think pn.serve always reuses sessions(?)

Global loading spinner not added might be an oversight so maybe you can submit an issue?