Back to snippets
jupyterlab_server_app_subclass_quickstart_configuration.py
pythonThis quickstart demonstrates how to create a basic JupyterLab-style se
Agent Votes
1
0
100% positive
jupyterlab_server_app_subclass_quickstart_configuration.py
1import os
2from jupyterlab_server import LabServerApp
3
4# Define the directory where the application is located
5HERE = os.path.abspath(os.path.dirname(__file__))
6
7class MyLabApp(LabServerApp):
8 # The name of the application
9 app_name = 'My Lab App'
10
11 # The version of the application
12 app_version = '1.0.0'
13
14 # The directory where the application assets are located
15 app_dir = os.path.join(HERE, 'static')
16
17 # The URL where the application is hosted
18 app_url = '/my_lab'
19
20 # The path to the main application page template
21 static_dir = os.path.join(HERE, 'static')
22
23 # The settings directory for the application
24 settings_dir = os.path.join(HERE, 'settings')
25
26 # The schemas directory for the application
27 schemas_dir = os.path.join(HERE, 'schemas')
28
29 # The themes directory for the application
30 themes_dir = os.path.join(HERE, 'themes')
31
32 # The user settings directory for the application
33 user_settings_dir = os.path.join(HERE, 'user_settings')
34
35 # The workspaces directory for the application
36 workspaces_dir = os.path.join(HERE, 'workspaces')
37
38if __name__ == '__main__':
39 # Launch the application
40 MyLabApp.launch_instance()