<!--

   This file was generated by Makefile.jupyter. Do not edit this file directly.

   The only parts of this file that should be edited are the front matter and the
   comment at the top of the file.

-->

# Simple Papermill Notebook

> [!NOTE]
> [View source on GitHub](https://github.com/unionai/unionai-examples/blob/main/v1/flyte-integrations/flytekit-plugins/papermill_plugin/papermill_plugin/nb_simple.ipynb) | [Run in Google Colab](https://colab.research.google.com/github/unionai/unionai-examples/blob/main/v1/flyte-integrations/flytekit-plugins/papermill_plugin/papermill_plugin/nb_simple.ipynb)

This notebook is used in the previous example as a `NotebookTask` to demonstrate
how to use the papermill plugin.

The cell below has the `parameters` tag, defining the inputs to the notebook.

```python
v = 3.14
```

Then, we do some computation:

```python
square = v*v
print(square)
```

Finally, we use the `flytekitplugins.papermill` package to record the outputs
so that flyte understands which state to serialize and pass into a downstream
task.

```python
from flytekitplugins.papermill  import record_outputs

record_outputs(square=square)
```

---
**Source**: https://github.com/unionai/unionai-docs/blob/main/content/integrations/flytekit-plugins/papermill-plugin/nb-simple.md
**HTML**: https://www.union.ai/docs/v1/flyte/integrations/flytekit-plugins/papermill-plugin/nb-simple/
