MCPcopy Create free account
hub / github.com/datapane/datapane / __init__

Method __init__

python-client/src/datapane/_vendor/bottle.py:616–649  ·  view source on GitHub ↗
(self, **kwargs)

Source from the content-addressed store, hash-verified

614 return cfg
615
616 def __init__(self, **kwargs):
617 #: A :class:`ConfigDict` for app specific configuration.
618 self.config = self._global_config._make_overlay()
619 self.config._add_change_listener(
620 functools.partial(self.trigger_hook, 'config'))
621
622 self.config.update({
623 "catchall": True
624 })
625
626 if kwargs.get('catchall') is False:
627 depr(0, 13, "Bottle(catchall) keyword argument.",
628 "The 'catchall' setting is now part of the app "
629 "configuration. Fix: `app.config['catchall'] = False`")
630 self.config['catchall'] = False
631 if kwargs.get('autojson') is False:
632 depr(0, 13, "Bottle(autojson) keyword argument.",
633 "The 'autojson' setting is now part of the app "
634 "configuration. Fix: `app.config['json.enable'] = False`")
635 self.config['json.disable'] = True
636
637 self._mounts = []
638
639 #: A :class:`ResourceManager` for application files
640 self.resources = ResourceManager()
641
642 self.routes = [] # List of installed :class:`Route` instances.
643 self.router = Router() # Maps requests to :class:`Route` instances.
644 self.error_handler = {}
645
646 # Core plugins
647 self.plugins = [] # List of installed plugins.
648 self.install(JSONPlugin())
649 self.install(TemplatePlugin())
650
651 #: If true, most exceptions are caught and returned as :exc:`HTTPError`
652 catchall = DictProperty('config', 'catchall')

Callers

nothing calls this directly

Calls 10

installMethod · 0.95
deprFunction · 0.85
ResourceManagerClass · 0.85
RouterClass · 0.85
JSONPluginClass · 0.85
TemplatePluginClass · 0.85
_make_overlayMethod · 0.80
_add_change_listenerMethod · 0.80
updateMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected