简体   繁体   中英

Does Jupyter support 'read-only' notebooks?

My team is currently developing a fairly quick clustering job using Pandas for business analysts. We're planning on hosting a local server where the end user can input a few parameters to be used during the routine execution, which will access an internal database and then return a CSV file.

A Jupyter server would be ideal for us, but the problem is that we can't have the user being able to edit the underlying code - all he needs to do is supply the parameters and start job execution. Converting it to HMTL, I think, turns everything static and means we can't delived updated data on demand.

Plan B is just making a small django app but I'm wondering if there's a way to accomplish what I need with Jupyter itself, or else if there's any better alternative for similar use cases? We don't even plan to display any widgets, just provide the user with the raw data output.

thanks in advance

There is also an notebook extension, Freeze which allows to lock (allow execution but not edit cell contents) or freeze (disables editing and execution) individual code cells or markdown blocks. This is important as order of execution for code cells matters while running notebook. This presentation at JupyterCon has more details on it.

just try eval this line in your browser console:

Jupyter.notebook.writable = false;

this will make current jupyter notebook file not writable, so any changes would not be allowed.

The notebook file can have its write permissions unset:

$ chmod -w notebook.ipynb

The notebook is still interactive, but the notebook file will not change.

保存符号已禁用标题为“此笔记本是只读的”

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM