Forrest logo
tool overview
On this page you find all important commands for the CLI tool jupytext. If the command you are looking for is missing please ask our AI.

jupytext

Jupytext is a command-line tool and Python library that allows bi-directional conversion between Jupyter notebooks and various plain text file formats. It enables editing Jupyter notebooks in plain text files using text editors or version control systems.

With Jupytext, you can convert Jupyter notebooks to and from formats like Markdown, Python scripts (.py), R Markdown, Julia scripts, and many more. It offers a seamless workflow and helps maintain a clean and human-readable code representation of the notebook.

The tool supports different conversion modes, including pairing a Jupyter notebook with an accompanying text file, synchronizing a Jupyter notebook with a plain text file, or simply converting between formats without preserving synchronization. It is highly customizable, allowing users to configure various options such as cell delimiters, header comments, and more.

Jupytext integrates easily with Jupyter notebooks and JupyterLab, offering a smooth experience for managing notebook files. It allows execution of a plain text file as a notebook, enabling the use of plain text files as lightweight alternatives to notebooks when execution is not required.

By using Jupytext, teams can collaborate more effectively on Jupyter notebooks using version control systems like Git, as changes are no longer limited to the binary .ipynb format. It also improves accessibility for people who prefer working with plain text editors or need to share notebooks in non-Jupyter environments.

Overall, Jupytext provides a practical and efficient solution for working with Jupyter notebooks in plain text files, enhancing collaboration, reproducibility, and code management.

List of commands for jupytext:

  • jupytext:tldr:0ced9 jupytext: Update the input cells in a notebook and preserve outputs and metadata.
    $ jupytext --update --to notebook ${notebook-py}
    try on your machine
    explain this command
  • jupytext:tldr:28098 jupytext: Convert a notebook to a `.py` file.
    $ jupytext --to py ${notebook-ipynb}
    try on your machine
    explain this command
  • jupytext:tldr:5239d jupytext: Convert a `.py` file to a notebook with no outputs.
    $ jupytext --to notebook ${notebook-py}
    try on your machine
    explain this command
  • jupytext:tldr:54043 jupytext: Update all paired representations of a notebook.
    $ jupytext --sync ${notebook-ipynb}
    try on your machine
    explain this command
  • jupytext:tldr:b638f jupytext: Turn a notebook into a paired `.ipynb`/`.py` notebook.
    $ jupytext --set-formats ipynb,py ${notebook-ipynb}
    try on your machine
    explain this command
  • jupytext:tldr:f8f24 jupytext: Convert a `.md` file to a notebook and run it.
    $ jupytext --to notebook --execute ${notebook-md}
    try on your machine
    explain this command
tool overview