spotlight
Renumics Spotlight
Functions​
show(dataset_or_folder=None, host='127.0.0.1', port='auto', layout=None, no_browser=False, allow_filebrowsing='auto', wait='auto', dtype=None)
​
Start a new Spotlight viewer.
Args​
dataset_or_folder
: root folder, dataset file or pandas.DataFrame (df) to open.
host
: optional host to run Spotlight at.
port
: optional port to run Spotlight at.
If "auto" (default), automatically choose a random free port.
layout
: optional Spotlight :mod:layout <renumics.spotlight.layout>
.
no_browser
: do not show Spotlight in browser.
allow_filebrowsing
: Whether to allow users to browse and open datasets.
If "auto" (default), allow to browse if dataset_or_folder
is a path.
wait
: If True
, block code execution until all Spotlight browser tabs are closed.
If False
, continue code execution after Spotlight start.
If "auto" (default), choose the mode automatically: non-blocking for
jupyter notebook
, ipython
and other interactive sessions;
blocking for scripts.
dtype
: Optional dict with mapping column name -> column type
with
column types allowed by Spotlight (for dataframes only).
close(port='last')
​
Close an active Spotlight viewer.
Args​
port
: optional port number at which the Spotlight viewer is running.
If "last" (default), close the last started Spotlight viewer.
Raises​
ViewNotFoundError
: if no Spotlight viewer found at the given port
.
viewers()
​
Get all active Spotlight viewer instances.
clear_caches()
​
Clear all cached data.
Classes​
Viewer(host='127.0.0.1', port='auto')
​
A Spotlight viewer. It corresponds to a single running Spotlight instance.
Viewer can be created using the :func:show
function.
Attributes​
host
: host at which Spotlight is running
port
: port at which Spotlight is running
Instance variables​
df
Get served DataFrame
if a DataFrame
is served, None
otherwise.
host
The configured host setting.
port
The port the viewer is running on.
running
True if the viewer's webserver is running, false otherwise.
Methods​
close(self, wait=False)
​
Shutdown the corresponding Spotlight instance.
open_browser(self)
​
Open the corresponding Spotlight instance in a browser.
refresh(self)
​
Refresh the corresponding Spotlight instance in a browser.
show(self, dataset_or_folder=None, layout=None, no_browser=False, allow_filebrowsing='auto', wait='auto', dtype=None)
​
Show a dataset or folder in this spotlight viewer.
Args​
dataset_or_folder
: root folder, dataset file or pandas.DataFrame (df) to open.
layout
: optional Spotlight :mod:layout <renumics.spotlight.layout>
.
no_browser
: do not show Spotlight in browser.
allow_filebrowsing
: Whether to allow users to browse and open datasets.
If "auto" (default), allow to browse if dataset_or_folder
is a path.
wait
: If True
, block code execution until all Spotlight browser tabs are closed.
If False
, continue code execution after Spotlight start.
If "auto" (default), choose the mode automatically: non-blocking for
jupyter notebook
, ipython
and other interactive sessions;
blocking for scripts.
dtype
: Optional dict with mapping column name -> column type
with
column types allowed by Spotlight (for dataframes only).