Skip to main content

Format code cells in Jupyter Notebook and JupyterLab using black.

Project description

jupyterblack

continuous-integration Python 3.8+ Checked with mypy pylint Score Code style: black Dependabot Status

pypiv

Licence CodeSize

Format code cells in Jupyter Notebook and JupyterLab using Black.

It's as simple as calling jblack

jblack notebook.ipynb

Install jupyterblack from the command line with pip

pip install jupyterblack

Usage

# Format one Jupyter file:
jblack notebook.ipynb

# Format multiple Jupyter files:
jblack notebook_1.ipynb notebook_2.ipynb [...]

# Format a directory:
jblack python/

# Format one Jupyter file with a line length of 70:
jblack -l 70 notebook.ipynb

# Show help:
jblack -h

Options

positional arguments:
  targets

optional arguments:
  -h, --help            show this help message and exit
  --check
  --pyi
  -l LINE_LENGTH, --line-length LINE_LENGTH
  -s, --skip-string-normalization
  -w WORKERS, --workers WORKERS
                        number of worker processes
  --show-invalid-code
  -t {py27,py33,py34,py35,py36,py37,py38} [{py27,py33,py34,py35,py36,py37,py38} ...], --target-version {py27,py33,py34,py35,py36,py37,py38} [{py27,py33,py34,py35,py36,py37,py38} ...]

Contribute

Support

If you are having issues or would like to propose a new feature, please use the issues tracker.

License

The project is licensed under the MIT license.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jupyterblack-0.3.7.tar.gz (9.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

jupyterblack-0.3.7-py3-none-any.whl (10.2 kB view details)

Uploaded Python 3

File details

Details for the file jupyterblack-0.3.7.tar.gz.

File metadata

  • Download URL: jupyterblack-0.3.7.tar.gz
  • Upload date:
  • Size: 9.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12

File hashes

Hashes for jupyterblack-0.3.7.tar.gz
Algorithm Hash digest
SHA256 5259968bed90030506a3572aa924501d226afa58fbe07208115fc991da58140c
MD5 99c63521258ba4713150e2cd8cb4c29a
BLAKE2b-256 f45212b0f5f4ffafb8c7f4ee8ea1769371796454622383e094a92d4b878509b9

See more details on using hashes here.

File details

Details for the file jupyterblack-0.3.7-py3-none-any.whl.

File metadata

  • Download URL: jupyterblack-0.3.7-py3-none-any.whl
  • Upload date:
  • Size: 10.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12

File hashes

Hashes for jupyterblack-0.3.7-py3-none-any.whl
Algorithm Hash digest
SHA256 c0f1a071fe6d1abf145649b0cc4b387c96480b9730276707d3a7d74dd8648d98
MD5 7c7f28944c0cdbc19f2eb4b42aef8776
BLAKE2b-256 ddb19c2320dd4660fe4ab2b647a77bc7c60898f0bd0b60a6db1c4fe967befc1c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page