AppService¶
-
class AppService(logger=
None, task_id=None, server_address=None, agent_token=None, ignore_errors=False, ignore_task_id=False)[source]¶ Bases:
objectLegacy app service runtime that receives commands/events and sends UI/state updates to Supervisely.
- Parameters:
Methods
call_periodic_function_syncA decorator that is used to register a view function for a given application command. This does the same thing as
add_callback()but is intended for decorator usage:: @app.callback('calc') def calc_func(): return 'Hello World' :param callback_name: the command name as string.compile_templateconsumeconsume_syncget_template_pathhandle_exceptionhandle_message_syncignore_errors_and_show_dialog_windowis_stoppedA decorator that is used to call functions periodically
publishpublish_syncrunschedulersend_responseshow_modal_windowstopAttributes
DEFAULT_EVENTSNETW_CHUNK_SIZEQUEUE_MAX_SIZEapp_urldata_dirrepo_dirsession_dir- callback(callback_name)[source]¶
A decorator that is used to register a view function for a given application command. This does the same thing as
add_callback()but is intended for decorator usage:@app.callback('calc') def calc_func(): return 'Hello World'- Parameters:
- callback_name¶
the command name as string