samlab.dashboard.backend.documents module

Warning

module ‘samlab.dashboard.backend.documents’ undocumented

class samlab.dashboard.backend.documents.Directory(*, name, root, pattern='.*\\.(html|txt)')[source]

Bases: samlab.dashboard.backend.documents.DocumentCollection, watchdog.events.FileSystemEventHandler

Warning

class ‘samlab.dashboard.backend.documents.Directory’ undocumented

get(index)[source]

Return a document by index.

Parameters

index (int, required) – The index of the image to return.

Returns

image – If str, the filesystem path of the image.

Return type

str or numpy.ndarray

property name

Warning

property ‘samlab.dashboard.backend.documents.Directory.name’ undocumented

on_any_event(event)[source]

Catch-all event handler.

Parameters

event (FileSystemEvent) – The event object representing the file system event.

reload()[source]

Warning

method ‘samlab.dashboard.backend.documents.Directory.reload’ undocumented

class samlab.dashboard.backend.documents.DocumentCollection[source]

Bases: abc.ABC

Warning

class ‘samlab.dashboard.backend.documents.DocumentCollection’ undocumented

abstract get(index)[source]

Return a document by index.

Parameters

index (int, required) – The index of the image to return.

Returns

image – If str, the filesystem path of the image.

Return type

str or numpy.ndarray

abstract property name

Warning

property ‘samlab.dashboard.backend.documents.DocumentCollection.name’ undocumented

property service

Warning

property ‘samlab.dashboard.backend.documents.DocumentCollection.service’ undocumented