time_split.app#

Supporting functions for the Streamlit companion app.

The app may be installed by running pip install time-split[app]. The application API is not stable, but will be available under the time_split_app namespace. Repo: rsundqvist/time-split-app.

Functions

create_explorer_link(host[, data, ...])

Create an application URL.

Create an application URL.

Parameters:
  • host – Base address where the application is hosted.

  • data – Binds schedule to a range. Regular available arguments (as passed to e.g. time_split.split()) are encoded as a date range to generate dummy data for. Pass a str to use a bundled dataset, or bytes to use a custom loader. Note that this will disable verification of the **kwargs.

  • available – Alias of data.

  • skip_default – If True, do not include default split params in the link.

  • show_removed – If True, splits removed by n_splits or step are included in the figure.

  • kwargs – Keyword arguments for the time_split.split()-function.

Returns:

An encoded URL.

Examples

Getting the URL for a local host.

>>> create_explorer_link(
...     host="http://localhost:8501",
...     available=("2019-04-11 00:35:00", "2019-05-11 21:30:00"),
...     schedule="0 0 * * MON,FRI",
... )
'http://localhost:8501?data=1554942900-1557610200&schedule=0+0+%2A+%2A+MON%2CFRI&show_removed=True'

To start the application using locally using Docker Image Size (tag) Docker, run

docker run -p 8501:8501 rsundqvist/time-split

in the terminal.

Modules

reexport

Reexported resources from the time_split_app namespace.