<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Module: html.services.notebooks.filenbmanager — IPython 2.3.0 documentation</title> <link rel="stylesheet" href="../../_static/default.css" type="text/css" /> <link rel="stylesheet" href="../../_static/pygments.css" type="text/css" /> <script type="text/javascript"> var DOCUMENTATION_OPTIONS = { URL_ROOT: '../../', VERSION: '2.3.0', COLLAPSE_INDEX: false, FILE_SUFFIX: '.html', HAS_SOURCE: true }; </script> <script type="text/javascript" src="../../_static/jquery.js"></script> <script type="text/javascript" src="../../_static/underscore.js"></script> <script type="text/javascript" src="../../_static/doctools.js"></script> <link rel="top" title="IPython 2.3.0 documentation" href="../../index.html" /> <link rel="up" title="The IPython API" href="../index.html" /> <link rel="next" title="Module: html.services.notebooks.handlers" href="IPython.html.services.notebooks.handlers.html" /> <link rel="prev" title="Module: html.services.nbconvert.handlers" href="IPython.html.services.nbconvert.handlers.html" /> </head> <body> <div style="background-color: white; text-align: left; padding: 10px 10px 15px 15px"> <a href="http://ipython.org/"><img src="../../_static/logo.png" border="0" alt="IPython Documentation"/></a> </div> <div class="related"> <h3>Navigation</h3> <ul> <li class="right" style="margin-right: 10px"> <a href="../../genindex.html" title="General Index" accesskey="I">index</a></li> <li class="right" > <a href="../../py-modindex.html" title="Python Module Index" >modules</a> |</li> <li class="right" > <a href="IPython.html.services.notebooks.handlers.html" title="Module: html.services.notebooks.handlers" accesskey="N">next</a> |</li> <li class="right" > <a href="IPython.html.services.nbconvert.handlers.html" title="Module: html.services.nbconvert.handlers" accesskey="P">previous</a> |</li> <li><a href="http://ipython.org">home</a>| </li> <li><a href="../../search.html">search</a>| </li> <li><a href="../../index.html">documentation </a> »</li> <li><a href="../index.html" accesskey="U">The IPython API</a> »</li> </ul> </div> <div class="sphinxsidebar"> <div class="sphinxsidebarwrapper"> <h3><a href="../../index.html">Table Of Contents</a></h3> <ul> <li><a class="reference internal" href="#">Module: <tt class="docutils literal"><span class="pre">html.services.notebooks.filenbmanager</span></tt></a><ul> <li><a class="reference internal" href="#class">1 Class</a></li> <li><a class="reference internal" href="#function">1 Function</a></li> </ul> </li> </ul> <h4>Previous topic</h4> <p class="topless"><a href="IPython.html.services.nbconvert.handlers.html" title="previous chapter">Module: <tt class="docutils literal"><span class="pre">html.services.nbconvert.handlers</span></tt></a></p> <h4>Next topic</h4> <p class="topless"><a href="IPython.html.services.notebooks.handlers.html" title="next chapter">Module: <tt class="docutils literal"><span class="pre">html.services.notebooks.handlers</span></tt></a></p> <h3>This Page</h3> <ul class="this-page-menu"> <li><a href="../../_sources/api/generated/IPython.html.services.notebooks.filenbmanager.txt" rel="nofollow">Show Source</a></li> </ul> <div id="searchbox" style="display: none"> <h3>Quick search</h3> <form class="search" action="../../search.html" method="get"> <input type="text" name="q" /> <input type="submit" value="Go" /> <input type="hidden" name="check_keywords" value="yes" /> <input type="hidden" name="area" value="default" /> </form> <p class="searchtip" style="font-size: 90%"> Enter search terms or a module, class or function name. </p> </div> <script type="text/javascript">$('#searchbox').show(0);</script> </div> </div> <div class="document"> <div class="documentwrapper"> <div class="bodywrapper"> <div class="body"> <div class="section" id="module-IPython.html.services.notebooks.filenbmanager"> <span id="module-html-services-notebooks-filenbmanager"></span><h1>Module: <tt class="xref py py-mod docutils literal"><span class="pre">html.services.notebooks.filenbmanager</span></tt><a class="headerlink" href="#module-IPython.html.services.notebooks.filenbmanager" title="Permalink to this headline">¶</a></h1> <p>A notebook manager that uses the local file system for storage.</p> <p>Authors:</p> <ul class="simple"> <li>Brian Granger</li> <li>Zach Sailer</li> </ul> <div class="section" id="class"> <h2>1 Class<a class="headerlink" href="#class" title="Permalink to this headline">¶</a></h2> <dl class="class"> <dt id="IPython.html.services.notebooks.filenbmanager.FileNotebookManager"> <em class="property">class </em><tt class="descclassname">IPython.html.services.notebooks.filenbmanager.</tt><tt class="descname">FileNotebookManager</tt><big>(</big><em>**kwargs</em><big>)</big><a class="headerlink" href="#IPython.html.services.notebooks.filenbmanager.FileNotebookManager" title="Permalink to this definition">¶</a></dt> <dd><p>Bases: <a class="reference internal" href="IPython.html.services.notebooks.nbmanager.html#IPython.html.services.notebooks.nbmanager.NotebookManager" title="IPython.html.services.notebooks.nbmanager.NotebookManager"><tt class="xref py py-class docutils literal"><span class="pre">IPython.html.services.notebooks.nbmanager.NotebookManager</span></tt></a></p> <dl class="method"> <dt id="IPython.html.services.notebooks.filenbmanager.FileNotebookManager.create_checkpoint"> <tt class="descname">create_checkpoint</tt><big>(</big><em>name</em>, <em>path=''</em><big>)</big><a class="headerlink" href="#IPython.html.services.notebooks.filenbmanager.FileNotebookManager.create_checkpoint" title="Permalink to this definition">¶</a></dt> <dd><p>Create a checkpoint from the current state of a notebook</p> </dd></dl> <dl class="method"> <dt id="IPython.html.services.notebooks.filenbmanager.FileNotebookManager.delete_checkpoint"> <tt class="descname">delete_checkpoint</tt><big>(</big><em>checkpoint_id</em>, <em>name</em>, <em>path=''</em><big>)</big><a class="headerlink" href="#IPython.html.services.notebooks.filenbmanager.FileNotebookManager.delete_checkpoint" title="Permalink to this definition">¶</a></dt> <dd><p>delete a notebook’s checkpoint</p> </dd></dl> <dl class="method"> <dt id="IPython.html.services.notebooks.filenbmanager.FileNotebookManager.delete_notebook"> <tt class="descname">delete_notebook</tt><big>(</big><em>name</em>, <em>path=''</em><big>)</big><a class="headerlink" href="#IPython.html.services.notebooks.filenbmanager.FileNotebookManager.delete_notebook" title="Permalink to this definition">¶</a></dt> <dd><p>Delete notebook by name and path.</p> </dd></dl> <dl class="method"> <dt id="IPython.html.services.notebooks.filenbmanager.FileNotebookManager.get_checkpoint_model"> <tt class="descname">get_checkpoint_model</tt><big>(</big><em>checkpoint_id</em>, <em>name</em>, <em>path=''</em><big>)</big><a class="headerlink" href="#IPython.html.services.notebooks.filenbmanager.FileNotebookManager.get_checkpoint_model" title="Permalink to this definition">¶</a></dt> <dd><p>construct the info dict for a given checkpoint</p> </dd></dl> <dl class="method"> <dt id="IPython.html.services.notebooks.filenbmanager.FileNotebookManager.get_checkpoint_path"> <tt class="descname">get_checkpoint_path</tt><big>(</big><em>checkpoint_id</em>, <em>name</em>, <em>path=''</em><big>)</big><a class="headerlink" href="#IPython.html.services.notebooks.filenbmanager.FileNotebookManager.get_checkpoint_path" title="Permalink to this definition">¶</a></dt> <dd><p>find the path to a checkpoint</p> </dd></dl> <dl class="method"> <dt id="IPython.html.services.notebooks.filenbmanager.FileNotebookManager.get_dir_model"> <tt class="descname">get_dir_model</tt><big>(</big><em>name</em>, <em>path=''</em><big>)</big><a class="headerlink" href="#IPython.html.services.notebooks.filenbmanager.FileNotebookManager.get_dir_model" title="Permalink to this definition">¶</a></dt> <dd><p>Get the directory model given a directory name and its API style path</p> </dd></dl> <dl class="method"> <dt id="IPython.html.services.notebooks.filenbmanager.FileNotebookManager.get_notebook"> <tt class="descname">get_notebook</tt><big>(</big><em>name</em>, <em>path=''</em>, <em>content=True</em><big>)</big><a class="headerlink" href="#IPython.html.services.notebooks.filenbmanager.FileNotebookManager.get_notebook" title="Permalink to this definition">¶</a></dt> <dd><p>Takes a path and name for a notebook and returns its model</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><p class="first"><strong>name</strong> : str</p> <blockquote> <div><p>the name of the notebook</p> </div></blockquote> <p><strong>path</strong> : str</p> <blockquote> <div><p>the URL path that describes the relative path for the notebook</p> </div></blockquote> </td> </tr> <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first"><strong>model</strong> : dict</p> <blockquote class="last"> <div><p>the notebook model. If contents=True, returns the ‘contents’ dict in the model as well.</p> </div></blockquote> </td> </tr> </tbody> </table> </dd></dl> <dl class="method"> <dt id="IPython.html.services.notebooks.filenbmanager.FileNotebookManager.get_notebook_names"> <tt class="descname">get_notebook_names</tt><big>(</big><em>path=''</em><big>)</big><a class="headerlink" href="#IPython.html.services.notebooks.filenbmanager.FileNotebookManager.get_notebook_names" title="Permalink to this definition">¶</a></dt> <dd><p>List all notebook names in the notebook dir and path.</p> </dd></dl> <dl class="method"> <dt id="IPython.html.services.notebooks.filenbmanager.FileNotebookManager.is_hidden"> <tt class="descname">is_hidden</tt><big>(</big><em>path</em><big>)</big><a class="headerlink" href="#IPython.html.services.notebooks.filenbmanager.FileNotebookManager.is_hidden" title="Permalink to this definition">¶</a></dt> <dd><p>Does the API style path correspond to a hidden directory or file?</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><p class="first"><strong>path</strong> : string</p> <blockquote> <div><p>The path to check. This is an API path (<cite>/</cite> separated, relative to base notebook-dir).</p> </div></blockquote> </td> </tr> <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first"><strong>exists</strong> : bool</p> <blockquote class="last"> <div><p>Whether the path is hidden.</p> </div></blockquote> </td> </tr> </tbody> </table> </dd></dl> <dl class="method"> <dt id="IPython.html.services.notebooks.filenbmanager.FileNotebookManager.list_checkpoints"> <tt class="descname">list_checkpoints</tt><big>(</big><em>name</em>, <em>path=''</em><big>)</big><a class="headerlink" href="#IPython.html.services.notebooks.filenbmanager.FileNotebookManager.list_checkpoints" title="Permalink to this definition">¶</a></dt> <dd><p>list the checkpoints for a given notebook</p> <p>This notebook manager currently only supports one checkpoint per notebook.</p> </dd></dl> <dl class="method"> <dt id="IPython.html.services.notebooks.filenbmanager.FileNotebookManager.list_dirs"> <tt class="descname">list_dirs</tt><big>(</big><em>path</em><big>)</big><a class="headerlink" href="#IPython.html.services.notebooks.filenbmanager.FileNotebookManager.list_dirs" title="Permalink to this definition">¶</a></dt> <dd><p>List the directories for a given API style path.</p> </dd></dl> <dl class="method"> <dt id="IPython.html.services.notebooks.filenbmanager.FileNotebookManager.list_notebooks"> <tt class="descname">list_notebooks</tt><big>(</big><em>path</em><big>)</big><a class="headerlink" href="#IPython.html.services.notebooks.filenbmanager.FileNotebookManager.list_notebooks" title="Permalink to this definition">¶</a></dt> <dd><p>Returns a list of dictionaries that are the standard model for all notebooks in the relative ‘path’.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><p class="first"><strong>path</strong> : str</p> <blockquote> <div><p>the URL path that describes the relative path for the listed notebooks</p> </div></blockquote> </td> </tr> <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first"><strong>notebooks</strong> : list of dicts</p> <blockquote class="last"> <div><p>a list of the notebook models without ‘content’</p> </div></blockquote> </td> </tr> </tbody> </table> </dd></dl> <dl class="method"> <dt id="IPython.html.services.notebooks.filenbmanager.FileNotebookManager.notebook_exists"> <tt class="descname">notebook_exists</tt><big>(</big><em>name</em>, <em>path=''</em><big>)</big><a class="headerlink" href="#IPython.html.services.notebooks.filenbmanager.FileNotebookManager.notebook_exists" title="Permalink to this definition">¶</a></dt> <dd><p>Returns a True if the notebook exists. Else, returns False.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><p class="first"><strong>name</strong> : string</p> <blockquote> <div><p>The name of the notebook you are checking.</p> </div></blockquote> <p><strong>path</strong> : string</p> <blockquote> <div><p>The relative path to the notebook (with ‘/’ as separator)</p> </div></blockquote> </td> </tr> <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">bool</p> </td> </tr> </tbody> </table> </dd></dl> <dl class="method"> <dt id="IPython.html.services.notebooks.filenbmanager.FileNotebookManager.path_exists"> <tt class="descname">path_exists</tt><big>(</big><em>path</em><big>)</big><a class="headerlink" href="#IPython.html.services.notebooks.filenbmanager.FileNotebookManager.path_exists" title="Permalink to this definition">¶</a></dt> <dd><p>Does the API-style path (directory) actually exist?</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><p class="first"><strong>path</strong> : string</p> <blockquote> <div><p>The path to check. This is an API path (<cite>/</cite> separated, relative to base notebook-dir).</p> </div></blockquote> </td> </tr> <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first"><strong>exists</strong> : bool</p> <blockquote class="last"> <div><p>Whether the path is indeed a directory.</p> </div></blockquote> </td> </tr> </tbody> </table> </dd></dl> <dl class="method"> <dt id="IPython.html.services.notebooks.filenbmanager.FileNotebookManager.rename_notebook"> <tt class="descname">rename_notebook</tt><big>(</big><em>old_name</em>, <em>old_path</em>, <em>new_name</em>, <em>new_path</em><big>)</big><a class="headerlink" href="#IPython.html.services.notebooks.filenbmanager.FileNotebookManager.rename_notebook" title="Permalink to this definition">¶</a></dt> <dd><p>Rename a notebook.</p> </dd></dl> <dl class="method"> <dt id="IPython.html.services.notebooks.filenbmanager.FileNotebookManager.restore_checkpoint"> <tt class="descname">restore_checkpoint</tt><big>(</big><em>checkpoint_id</em>, <em>name</em>, <em>path=''</em><big>)</big><a class="headerlink" href="#IPython.html.services.notebooks.filenbmanager.FileNotebookManager.restore_checkpoint" title="Permalink to this definition">¶</a></dt> <dd><p>restore a notebook to a checkpointed state</p> </dd></dl> <dl class="method"> <dt id="IPython.html.services.notebooks.filenbmanager.FileNotebookManager.save_notebook"> <tt class="descname">save_notebook</tt><big>(</big><em>model</em>, <em>name=''</em>, <em>path=''</em><big>)</big><a class="headerlink" href="#IPython.html.services.notebooks.filenbmanager.FileNotebookManager.save_notebook" title="Permalink to this definition">¶</a></dt> <dd><p>Save the notebook model and return the model with no content.</p> </dd></dl> <dl class="method"> <dt id="IPython.html.services.notebooks.filenbmanager.FileNotebookManager.update_notebook"> <tt class="descname">update_notebook</tt><big>(</big><em>model</em>, <em>name</em>, <em>path=''</em><big>)</big><a class="headerlink" href="#IPython.html.services.notebooks.filenbmanager.FileNotebookManager.update_notebook" title="Permalink to this definition">¶</a></dt> <dd><p>Update the notebook’s path and/or name</p> </dd></dl> </dd></dl> </div> <div class="section" id="function"> <h2>1 Function<a class="headerlink" href="#function" title="Permalink to this headline">¶</a></h2> <dl class="function"> <dt id="IPython.html.services.notebooks.filenbmanager.sort_key"> <tt class="descclassname">IPython.html.services.notebooks.filenbmanager.</tt><tt class="descname">sort_key</tt><big>(</big><em>item</em><big>)</big><a class="headerlink" href="#IPython.html.services.notebooks.filenbmanager.sort_key" title="Permalink to this definition">¶</a></dt> <dd><p>Case-insensitive sorting.</p> </dd></dl> </div> </div> </div> </div> </div> <div class="clearer"></div> </div> <div class="related"> <h3>Navigation</h3> <ul> <li class="right" style="margin-right: 10px"> <a href="../../genindex.html" title="General Index" >index</a></li> <li class="right" > <a href="../../py-modindex.html" title="Python Module Index" >modules</a> |</li> <li class="right" > <a href="IPython.html.services.notebooks.handlers.html" title="Module: html.services.notebooks.handlers" >next</a> |</li> <li class="right" > <a href="IPython.html.services.nbconvert.handlers.html" title="Module: html.services.nbconvert.handlers" >previous</a> |</li> <li><a href="http://ipython.org">home</a>| </li> <li><a href="../../search.html">search</a>| </li> <li><a href="../../index.html">documentation </a> »</li> <li><a href="../index.html" >The IPython API</a> »</li> </ul> </div> <div class="footer"> © Copyright The IPython Development Team. Last updated on Jul 14, 2015. Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3. </div> </body> </html>