A package to strip metadata from code cells and markdowns without editing the output in Jupyter notebooks.
Project description
Strip Notebook Metadata
A package to strip metadata from code cells and markdowns without editing the output in Jupyter notebooks.
A simple, effective tool for cleaning metadata from Jupyter notebooks. This package helps in reducing the size of notebooks and removing potentially sensitive information stored in metadata, making notebooks cleaner for version control and sharing.
Pypi.org: https://pypi.org/project/strip-notebook-metadata/
Features
- Simple Command-Line interface: Easy to use, run it directly from your terminal.
- Cleans metadata: Strips out metadata from both code and markdown cells.
- Supports Jupyter Notebooks: Works with
.ipynb
files, the standard Jupyter notebook format.
Installation
Install strip-notebook-metadata
using pip:
pip install strip-notebook-metadata
Dependencies
- sys
- nbformat
Usage
To strip metadata from a Jupyter notebook, run:
strip-notebook-metadata path/to/your_notebook.ipynb
Replace path/to/your_notebook.ipynb
with the actual path to the notebook you wish to clean.
To add it under your pre-commit hooks, add the following under your pre-commit-config.yaml:
- repo: https://github.com/kyriaki-mvr/strip-notebook-metadata
rev: v0.2.0
hooks:
- id: strip-notebook-metadata
Contributing
Contributions are welcome! If you'd like to contribute, please fork the repository and use a feature branch. Pull requests are warmly welcomed.
Feedback
If you have any feedback, please file an issue on the GitHub repository page. I am always looking to improve and appreciate all feedback, bug reports, and suggestions.
License
This project is licensed under the GPL License - see the LICENSE file for details.
Authors
- Kyriaki Mavropoulou (kyriaki@quanterra.gr) - Initial work
First release
02-March-2024
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file strip_notebook_metadata-0.2.0.tar.gz
.
File metadata
- Download URL: strip_notebook_metadata-0.2.0.tar.gz
- Upload date:
- Size: 14.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.13.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
4e0f02799069eb3b16c8a73c26524627f5ca17497c754f4bbea1f89db7f1a15a
|
|
MD5 |
a75d3707032d2dde58e6aacbe114422b
|
|
BLAKE2b-256 |
949b8636e594a38e82eed1579f9ab42af1189b9752d74ac868bdeee45d16b5f0
|
File details
Details for the file strip_notebook_metadata-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: strip_notebook_metadata-0.2.0-py3-none-any.whl
- Upload date:
- Size: 15.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.13.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
b7a8a08d061802602e613c060f825fdcd4b2cc3bc9189fabe85c471a6739d838
|
|
MD5 |
476399d1697c542cb9a3848cecb66243
|
|
BLAKE2b-256 |
62df5ae58282009eccdb5dbba8f0a01e2e9bf29924324fded9f9afaa50baa4e5
|