clean-notebook


Nameclean-notebook JSON
Version 0.1.15 PyPI version JSON
download
home_pageNone
SummaryA simple package to clean Jupyter notebooks
upload_time2024-06-06 07:39:42
maintainerSimon Hansen
docs_urlNone
authorSimon Hansen
requires_python>=3.8
licenseNone
keywords clean jupyter notebook
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Clean up notebook

A simple command to clean up your Jupyter notebooks.

## Usage

If you want to run this tool in a CLI, [pipx](https://pypa.github.io/pipx/) is advised.

```bash
pipx install clean-notebook
```

To use `clean-notebook` with [pre-commit](https://pre-commit.com/), add this to your `.pre-commit-config.yaml`:

```yaml
- repo: https://github.com/hoxbro/clean_notebook
  rev: "" # Use the sha / tag you want to point at
  hooks:
    - id: clean-notebook
```

## Configuration

To clean a notebook run the command `clean-notebook example.ipynb` or if you want to do it for multiple files `clean-notebook example1.ipynb example2.ipynb`.

The following arguments are supported `--dry-run` to not overwrite the file and `--keep-empty` to keep empty cells. If you want not to delete a specific metadata key, the `-i`/`--ignore` argument can be used. If more keys should be ignored: `clean-notebook . -i tags -i slideshow`. If you want remove ending newlines in code cells, use the `-s`/`--strip-trailing-newlines` argument.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "clean-notebook",
    "maintainer": "Simon Hansen",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "clean, jupyter, notebook",
    "author": "Simon Hansen",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/e8/fa/03a1ac85302e17192e2aca7716bb5e0fd877ccf42b26ac2c2a263a12098a/clean_notebook-0.1.15.tar.gz",
    "platform": null,
    "description": "# Clean up notebook\n\nA simple command to clean up your Jupyter notebooks.\n\n## Usage\n\nIf you want to run this tool in a CLI, [pipx](https://pypa.github.io/pipx/) is advised.\n\n```bash\npipx install clean-notebook\n```\n\nTo use `clean-notebook` with [pre-commit](https://pre-commit.com/), add this to your `.pre-commit-config.yaml`:\n\n```yaml\n- repo: https://github.com/hoxbro/clean_notebook\n  rev: \"\" # Use the sha / tag you want to point at\n  hooks:\n    - id: clean-notebook\n```\n\n## Configuration\n\nTo clean a notebook run the command `clean-notebook example.ipynb` or if you want to do it for multiple files `clean-notebook example1.ipynb example2.ipynb`.\n\nThe following arguments are supported `--dry-run` to not overwrite the file and `--keep-empty` to keep empty cells. If you want not to delete a specific metadata key, the `-i`/`--ignore` argument can be used. If more keys should be ignored: `clean-notebook . -i tags -i slideshow`. If you want remove ending newlines in code cells, use the `-s`/`--strip-trailing-newlines` argument.\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "A simple package to clean Jupyter notebooks",
    "version": "0.1.15",
    "project_urls": {
        "Homepage": "https://github.com/hoxbro/clean_notebook",
        "Source": "https://github.com/hoxbro/clean_notebook"
    },
    "split_keywords": [
        "clean",
        " jupyter",
        " notebook"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "98338b2242331097c513c445f1d62ddc543615f025e57d4b60f27751323f0e05",
                "md5": "eb0bb7e25174762d0c20e41692709532",
                "sha256": "a7921bd9761ae41a4a0cf9907bcc18b7d4ff1ad8aab3fb047e0fcda7060fd65b"
            },
            "downloads": -1,
            "filename": "clean_notebook-0.1.15-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "eb0bb7e25174762d0c20e41692709532",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 5331,
            "upload_time": "2024-06-06T07:39:40",
            "upload_time_iso_8601": "2024-06-06T07:39:40.967975Z",
            "url": "https://files.pythonhosted.org/packages/98/33/8b2242331097c513c445f1d62ddc543615f025e57d4b60f27751323f0e05/clean_notebook-0.1.15-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e8fa03a1ac85302e17192e2aca7716bb5e0fd877ccf42b26ac2c2a263a12098a",
                "md5": "2c45d5f51873b289dd4e2d5b812aee02",
                "sha256": "7e7ec8cff0b6f837aa763e27731da2f18e088291f950221e3b717ef83925af43"
            },
            "downloads": -1,
            "filename": "clean_notebook-0.1.15.tar.gz",
            "has_sig": false,
            "md5_digest": "2c45d5f51873b289dd4e2d5b812aee02",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 7995,
            "upload_time": "2024-06-06T07:39:42",
            "upload_time_iso_8601": "2024-06-06T07:39:42.511927Z",
            "url": "https://files.pythonhosted.org/packages/e8/fa/03a1ac85302e17192e2aca7716bb5e0fd877ccf42b26ac2c2a263a12098a/clean_notebook-0.1.15.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-06-06 07:39:42",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "hoxbro",
    "github_project": "clean_notebook",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "clean-notebook"
}
        
Elapsed time: 0.28637s