MCPcopy Index your code
hub / github.com/hugapi/hug / add_startup_handler

Method add_startup_handler

hug/api.py:616–621  ·  view source on GitHub ↗

Adds a startup handler to the hug api

(self, handler)

Source from the content-addressed store, hash-verified

614 self.add_startup_handler(startup_handler)
615
616 def add_startup_handler(self, handler):
617 """Adds a startup handler to the hug api"""
618 if not self.startup_handlers:
619 self._startup_handlers = []
620
621 self.startup_handlers.append(handler)
622
623 def _ensure_started(self):
624 """Marks the API as started and runs all startup handlers"""

Callers 2

extendMethod · 0.95
startup_wrapperFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected