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

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.4.0.tar.gz (9.3 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.4.0-py3-none-any.whl (10.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: jupyterblack-0.4.0.tar.gz
  • Upload date:
  • Size: 9.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.12

File hashes

Hashes for jupyterblack-0.4.0.tar.gz
Algorithm Hash digest
SHA256 a8e419f3d967c06feb2bce8bbd996c3c1a293f93eaccc62667a3bdc42ca64b3e
MD5 84a73a046caa45224a0b31abacc59e90
BLAKE2b-256 f37de92cda9e422e84175976b4a121b67b0155c0abaee1b8fa63a04f65c53f2f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: jupyterblack-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 10.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.12

File hashes

Hashes for jupyterblack-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 379fcac3c64ca446c346939a61cfaa2e4be0237130e51a3bc393d44ed41e4e84
MD5 f342290794afc0e94d1c7c84f122dac0
BLAKE2b-256 63f7d7442ed9d9b8168288468fb82fc8927482daf6c5816b3953d388edf6c834

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