You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/source/developers/extensions.rst
+6-1Lines changed: 6 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -156,14 +156,19 @@ The basic structure of an ExtensionApp is shown below:
156
156
...
157
157
# Change the jinja templating environment
158
158
159
+
asyncdefstop_extension(self):
160
+
...
161
+
# Perform any required shut down steps
162
+
159
163
160
164
The ``ExtensionApp`` uses the following methods and properties to connect your extension to the Jupyter server. You do not need to define a ``_load_jupyter_server_extension`` function for these apps. Instead, overwrite the pieces below to add your custom settings, handlers and templates:
161
165
162
166
Methods
163
167
164
-
* ``initialize_setting()``: adds custom settings to the Tornado Web Application.
168
+
* ``initialize_settings()``: adds custom settings to the Tornado Web Application.
165
169
* ``initialize_handlers()``: appends handlers to the Tornado Web Application.
166
170
* ``initialize_templates()``: initialize the templating engine (e.g. jinja2) for your frontend.
171
+
* ``stop_extension()``: called on server shut down.
0 commit comments