How to Execute a Notebook Within a Notebook: Is It Possible and How?

14 Replies, 865 Views

Hey there! Just wanted to chime in and say that executing a notebook within a notebook is totally doable. I’ve used `nbclient` for this, and it works like a charm. Here’s a quick snippet:

```python
from nbclient import NotebookClient

nb = NotebookClient(nb=your_notebook_object, resources={}, kernel_name='python3')
nb.execute()
```

It’s lightweight and integrates well with Jupyter.

Also, if you’re into automation, you might wanna check out `ploomber`. It’s a bit more advanced but super powerful for managing notebook workflows.

Hope this gives you some ideas!

Messages In This Thread



Users browsing this thread: 1 Guest(s)