Notebook and IPython shell¶
Websauna comes with an integrated IPython Notebook shell. When it’s enabled you can directly open IPython Notebook shell from your website with a single click. It also serves as more user friendly alternative for terminal based shell.
Notebook shell is very powerful, equal to giving a full shell access to a person. Thus it is disabled by default. You need to enable notebook for each user by whitelisting username or email in your application configuration file.
- development.ini allows notebook access for admin uses
- production.ini needs to whitelist all users with notebook access individually
You can open a notebook in any part of your site and prepopulate it with data. An example of this is the default admin interface which can open shell for any shown item.
How to do this see
The notebook process is spawned separately from the web server. Each user can hold only one active notebook session. The notebook process automatically terminated 30 minutes after the launch unless the user shuts it down.
Currently IPython Notebook feature works with localhost and certain production web servers only. Refer to pyramid_notebook for more information.
Notebook is configured in
Notebook is disabled by default in production setups using settings as described above, so this step is unnecessary unless you want to harden your configuration further.
If you do not wish to use notebook functionality you can remove it from the default set up by overriding
websauna.system.Initializer.configure_notebook() in your application:
class Initializer(websauna.system.Initializer): # ... def configure_notebook(self): pass # Disable all IPython Notebook functionality