Module Import alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias identifier ImportFrom alias identifier ImportFrom alias Assign NameStore Str Assign NameStore Str Assign NameStore Str FunctionDef arguments args NameParam NameParam NameParam defaults Str Str body Expr Str Assign NameStore Dict Assign NameStore SubscriptLoad AttributeLoad AttributeLoad NameLoad attr attr Index Str Assign NameStore SubscriptLoad NameLoad Index Str Expr Call AttributeLoad NameLoad attr NameLoad NameLoad keyword NameLoad keyword Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Return Call NameLoad NameLoad AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return Call NameLoad NameLoad AttributeLoad AttributeLoad NameLoad attr attr decorator_list Call NameLoad keyword Str keyword Str keyword NameLoad FunctionDef arguments args NameParam defaults body Expr Str Return Call NameLoad NameLoad decorator_list Call NameLoad keyword Str keyword Str FunctionDef arguments args NameParam defaults body Expr Str Expr Call NameLoad NameLoad AttributeLoad AttributeLoad NameLoad attr attr Return Call NameLoad Call AttributeLoad NameLoad attr Str decorator_list Call NameLoad keyword Str keyword Str
N/A N/A os pyramid.httpexceptions HTTPFound pyramid.view view_config pyramid_notebook startup pyramid_notebook.views launch_notebook pyramid_notebook.views shutdown_notebook _shutdown_notebook pyramid_notebook.views notebook_proxy _notebook_proxy websauna.system.model.meta Base N/A WEBSAUNA_BOOSTRAP 
from pkg_resources import load_entry_point
from pyramid_notebook.utils import change_directory

# We need to use this to trigger a proper namespaced package loading
# due to different approaches between pip / easy_install / python setup.py develop
# (it doesn't matter which entry point we load as long as it's from websauna package)
entry_point  = load_entry_point('websauna', 'console_scripts', 'ws-shell')

from websauna.system.devop.cmdline import init_websauna_script_env

# Our development.ini, production.ini, etc.
config_file = '{config_uri}'

with change_directory('{cwd}'):
    script_env = init_websauna_script_env(config_file)
    globals().update(script_env)

 N/A SCRIPT 
dbsession = request.dbsession
from websauna.utils.time import now
import sqlalchemy
 N/A GREETING 
* **sqlalchemy** - sqlachemy module
* **dbsession** - SQLAlchemy database session
* **now()** - UTC time as timezone aware datetime object
* **initializer** - websauna.system.Initializer instance
 launch_context_sensitive_shell N/A N/A request extra_script extra_greeting N/A N/A N/A Launch a IPython Notebook.

    :param extra_script: Extra script executed on the launch of this notebook
    :param extra_greeting: Extra text in the greeting Markdown for this launch
     N/A nb N/A N/A global_config N/A N/A N/A request registry settings N/A websauna.global_config N/A config_file N/A global_config N/A __file__ N/A N/A N/A startup make_startup nb config_file bootstrap_py WEBSAUNA_BOOSTRAP cwd N/A N/A os getcwd N/A N/A N/A startup add_script nb SCRIPT N/A N/A N/A startup add_greeting nb GREETING N/A N/A N/A startup include_sqlalchemy_models nb Base N/A N/A N/A startup add_script nb extra_script N/A N/A N/A startup add_greeting nb extra_greeting N/A N/A launch_notebook request N/A N/A request user username notebook_context nb N/A notebook_proxy N/A N/A request N/A N/A N/A Proxy IPython Notebook requests to the upstream server.

    A special ``shell`` permission is needed to access this view. See :ref:`websauna.superusers`.
     N/A N/A _notebook_proxy request N/A N/A request user username N/A N/A view_config route_name notebook_proxy permission shell require_csrf False admin_shell N/A N/A request N/A N/A N/A Open admin shell with default parameters for the user.

    A special ``shell`` permission is needed to access this view. See :ref:`websauna.superusers`.
     N/A N/A launch_context_sensitive_shell request N/A N/A view_config route_name admin_shell permission shell shutdown_notebook N/A N/A request N/A N/A N/A Shutdown the notebook of the current user. N/A N/A _shutdown_notebook request N/A N/A request user username N/A N/A HTTPFound N/A N/A request route_url home N/A N/A view_config route_name shutdown_notebook permission shell