Skip to main content

Move import statements in jupyter notebook to the first cell

Project description

nb_move_imports


PyPI version Python version Release Pipeline Test Code Quality License: MIT pre-commit

Move import statements in jupyter notebook to the first cell

Use nb_move_imports

To run the script on a specific jupyter notebook run:

nb_move_imports path/to/notebook.ipynb

Skip processing of cells

In order to skip a cell you have to tag it with the IGNORE_MV_IMPORTS tag.

Precommit Hook

Add this section to your pre-commit-config.yaml so that the nb_move_imports script is executed before each commit with pre-commit.

- repo: https://github.com/AnH0ang/nb_move_imports
  rev: 0.4.5
  hooks:
    - id: nb_move_imports
      name: nb_move_imports

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

nb_move_imports-0.4.5.tar.gz (3.0 kB view details)

Uploaded Source

Built Distribution

nb_move_imports-0.4.5-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

Details for the file nb_move_imports-0.4.5.tar.gz.

File metadata

  • Download URL: nb_move_imports-0.4.5.tar.gz
  • Upload date:
  • Size: 3.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.2 CPython/3.8.15 Linux/5.15.0-1036-azure

File hashes

Hashes for nb_move_imports-0.4.5.tar.gz
Algorithm Hash digest
SHA256 c38a73487a03db8701171bec3ecbf54aa363bba6d38a1ac8d0e191fb59c24189
MD5 f6261fd3fa111b189b811e84291481e6
BLAKE2b-256 867df9de8619dcc2589c401a2a7b17daf06ef3546a12e08da063016d9602d5a4

See more details on using hashes here.

File details

Details for the file nb_move_imports-0.4.5-py3-none-any.whl.

File metadata

  • Download URL: nb_move_imports-0.4.5-py3-none-any.whl
  • Upload date:
  • Size: 3.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.2 CPython/3.8.15 Linux/5.15.0-1036-azure

File hashes

Hashes for nb_move_imports-0.4.5-py3-none-any.whl
Algorithm Hash digest
SHA256 60deb7d2628db3501826081221241107cdc4911a5004c4bc564f37687c5523ee
MD5 85eb3e1903c7208917b42a7d9451a65b
BLAKE2b-256 6ad27d69192aec2f1204b02e18b4960f3dc5117da4bb31deed4373ef51413f65

See more details on using hashes here.

Supported by

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