MCPcopy
hub / github.com/encode/uvicorn / load_app

Method load_app

uvicorn/config.py:412–418  ·  view source on GitHub ↗

Import the app and return it. Exits on failure.

(self)

Source from the content-addressed store, hash-verified

410 logging.getLogger("uvicorn.access").propagate = False
411
412 def load_app(self) -> Any:
413 """Import the app and return it. Exits on failure."""
414 try:
415 return import_from_string(self.app)
416 except ImportFromStringError as exc:
417 logger.error("Error loading ASGI app. %s" % exc)
418 sys.exit(1)
419
420 def load(self) -> None:
421 assert not self.loaded

Callers 2

loadMethod · 0.95
runFunction · 0.95

Calls 1

import_from_stringFunction · 0.90

Tested by

no test coverage detected