pysepal.sepalwidgets.file_input.FileInput#

class pysepal.sepalwidgets.file_input.FileInput(*args, **kwargs)[source]#

Custom widget to select files from the local machine or the sepal server.

Parameters:
  • initial_folder (str) – The initial folder to read files from.

  • root (str) – Maximum root directory that can be accessed.

  • sepal_client (SepalClient) – Sepal client to access the server.

Attributes

base_path

A trait for unicode strings.

clearable

A boolean (True, False) trait.

current_folder

A trait for unicode strings.

error_messages

An instance of a Python list.

extensions

An instance of a Python list.

file

A trait for unicode strings.

file_list

An instance of a Python list.

label

A trait for unicode strings.

loading

A boolean (True, False) trait.

reload_files

An int trait.

root

A trait for unicode strings.

template_file

A trait for unicode strings.

v_model

A trait for unicode strings.

value

A trait for unicode strings.

Methods

__init__

Custom widget to select files from the local machine or the sepal server.

load_files

Load the files in the current folder.

reset

Reset the file input widget.

select_file

Select a file from the list.

FileInput.__init__(initial_folder='', root='', sepal_client=None, **kwargs)[source]#

Custom widget to select files from the local machine or the sepal server.

Parameters:
  • initial_folder (str) – The initial folder to read files from.

  • root (str) – Maximum root directory that can be accessed.

  • sepal_client (SepalClient | None) – Sepal client to access the server.

FileInput.load_files(*_)[source]#

Load the files in the current folder.

FileInput.reset()[source]#

Reset the file input widget.

FileInput.select_file(path)[source]#

Select a file from the list.

Parameters:

path (str | Path)