Metadata-Version: 2.4
Name: subnotebook
Version: 0.0.1
Summary: Call notebooks as functions
Project-URL: Source, https://github.com/davidbrochart/subnotebook
Project-URL: Issues, https://github.com/davidbrochart/subnotebook/issues
Author-email: David Brochart <david.brochart@gmail.com>
License: This is the MIT license: http://www.opensource.org/licenses/mit-license.php
        
        Copyright (c) David Brochart
        
        Permission is hereby granted, free of charge, to any person obtaining a copy of this
        software and associated documentation files (the "Software"), to deal in the Software
        without restriction, including without limitation the rights to use, copy, modify, merge,
        publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
        to whom the Software is furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all copies or
        substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
        INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
        PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
        FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
        OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
        DEALINGS IN THE SOFTWARE.
License-File: LICENSE
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Database
Classifier: Typing :: Typed
Requires-Python: >=3.8
Requires-Dist: nbformat>=5
Description-Content-Type: text/markdown

# Subnotebook

Run a notebook as you would call a Python function.

Two modes are currently supported:

- An in-process mode, where the subnotebook is executed in the same kernel your
interpreter is running in (but in a different name space). This allows to pass
parameters and get results back, including widgets.
```python
from subnotebook import run_nb

ab, ba, slider, output = run_nb('sub_notebook.ipynb', a='c', b='d')
```

- An out-of-process mode, where the subnotebook is executed and served using
[Voila](https://voila.readthedocs.io), and included in the main notebook as an
IFrame. This mode only allows to display the outputs of the subnotebook, which
is useful for offloading the main notebook but also to offer a UI to resources
you would not have access to, such as big data or protected data.
```python
from subnotebook import display_nb

display_nb('widget_notebook.ipynb')
```
