Skip to main content

🎉 We released Spotlight 1.4.0 check it out →

Version: 1.4.0

spotlight

Renumics Spotlight

Functions​

show(dataset=None, folder=None, host='127.0.0.1', port='auto', layout=None, no_browser=False, allow_filebrowsing='auto', wait='auto', dtype=None, analyze=None, issues=None)​

Start a new Spotlight viewer.

Args​

dataset : Dataset file or pandas.DataFrame (df) to open.

folder : Root folder for filebrowser and lookup of dataset files.

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 "forever", keep spotlight running forever, but block. If "auto" (default), choose the mode automatically: non-blocking (False) for jupyter notebook, ipython and other interactive sessions; blocking (True) for scripts.

dtype : Optional dict with mapping column name -> column type with column types allowed by Spotlight (for dataframes only).

analyze : Automatically analyze common dataset issues (disabled by default).

issues : Custom dataset issues displayed in the viewer.

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.

url The viewer's url.

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, folder=None, layout=None, no_browser=False, allow_filebrowsing='auto', wait='auto', dtype=None, analyze=None, issues=None)​

Show a dataset or folder in this spotlight viewer.

Args​

dataset : Dataset file or pandas.DataFrame (df) to open.

folder : Root folder for filebrowser and lookup of dataset files.

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 "forever", keep spotlight running forever, but block. If "auto" (default), choose the mode automatically: non-blocking (False) for jupyter notebook, ipython and other interactive sessions; blocking (True) for scripts.

dtype : Optional dict with mapping column name -> column type with column types allowed by Spotlight (for dataframes only).

analyze : Automatically analyze common dataset issues (disabled by default).

issues : Custom dataset issues displayed in the viewer.

DataIssue(title, rows, severity='medium', columns=None, description='')​

An Issue affecting multiple rows of the dataset