#formatting #formatter #jupyter

dprint-plugin-jupyter

Formats code blocks in Jupyter notebooks

5 releases

new 0.1.3 Feb 23, 2024
0.1.2 Nov 27, 2023
0.1.1 Nov 24, 2023
0.1.0 Nov 24, 2023
0.0.1 Nov 23, 2023

#1454 in Text processing

Download history 5/week @ 2023-11-17 323/week @ 2023-11-24 414/week @ 2023-12-01 471/week @ 2023-12-08 675/week @ 2023-12-15 636/week @ 2023-12-22 683/week @ 2023-12-29 804/week @ 2024-01-05 823/week @ 2024-01-12 772/week @ 2024-01-19 1032/week @ 2024-01-26 925/week @ 2024-02-02 904/week @ 2024-02-09 747/week @ 2024-02-16

3,838 downloads per month
Used in deno

MIT license

22KB
497 lines

dprint-plugin-jupyter

CI

Formats code blocks in Jupyter notebook files (.ipynb) using dprint plugins.

Install

Install and setup dprint.

Then in your project's directory with a dprint.json file, run:

dprint config add jupyter

Then add some additional formatting plugins to format the code blocks with. For example:

dprint config add typescript
dprint config add markdown
dprint config add ruff

If you find a code block isn't being formatted with a plugin, please verify it's not a syntax error. After, open an issue about adding support for that plugin (if you're interested in opening a PR, it's potentially an easy contribution).

Configuration

Configuration is handled in other plugins.

Dependencies

~1.9–2.8MB
~58K SLoC