MCPcopy Index your code
hub / github.com/authlib/authlib / init_app

Method init_app

authlib/integrations/flask_client/__init__.py:24–38  ·  view source on GitHub ↗

Initialize lazy for Flask app. This is usually used for Flask application factory pattern.

(self, app, cache=None, fetch_token=None, update_token=None)

Source from the content-addressed store, hash-verified

22 self.init_app(app)
23
24 def init_app(self, app, cache=None, fetch_token=None, update_token=None):
25 """Initialize lazy for Flask app. This is usually used for Flask application
26 factory pattern.
27 """
28 self.app = app
29 if cache is not None:
30 self.cache = cache
31
32 if fetch_token:
33 self.fetch_token = fetch_token
34 if update_token:
35 self.update_token = update_token
36
37 app.extensions = getattr(app, "extensions", {})
38 app.extensions["authlib.integrations.flask_client"] = self
39
40 def create_client(self, name):
41 if not self.app:

Callers 7

__init__Method · 0.95
test_init_app_laterFunction · 0.95
test_init_app_paramsFunction · 0.95
dbFunction · 0.45
dbFunction · 0.45

Calls

no outgoing calls

Tested by 6

test_init_app_laterFunction · 0.76
test_init_app_paramsFunction · 0.76
dbFunction · 0.36
dbFunction · 0.36