Set Jupyter notebook cell tags from a special comment
Project description
nbtag
Set cell tags in a Jupyter notebook from a special comment.
Why use this extension?
Many tools in the Jupyter ecosystem (ex. nbmake, nbstripout) use cell tags to configure their behavior.
However, some frontends to Jupyter (ex. ein) can't modify tags.
This server extension watches for a special comment in the content of the cell and sets tags correspondingly.
How to use
# %tags: keep_output, another_tag
print("Hello World!")
A cell containing the text above will be given the tags keep_output,
another_tag on saving.
Install
pip install nbtag
If you use pipx, make sure to inject nbtag into the Jupyter package's
environment.
Enable
jupyter serverextension enable nbtag
jupyter serverextension list
Compatibility
Only works with jupyter server, not with jupyter notebook, but I think you
should be using jupyter server + nbclassic instead of jupyter notebook
anyway?
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nbtag-0.0.2.tar.gz.
File metadata
- Download URL: nbtag-0.0.2.tar.gz
- Upload date:
- Size: 2.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.23.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
572298c0f3dd3df721080d101abbbc4b7948197687e39f0744cd29f2ff77de66
|
|
| MD5 |
cb57d4c6d56408f8d09fce49e6a3bc3b
|
|
| BLAKE2b-256 |
9e38c2cdc0ac6053f6df71e786d9d731ab7d80262ecc8003935e2930c3bd21b8
|
File details
Details for the file nbtag-0.0.2-py3-none-any.whl.
File metadata
- Download URL: nbtag-0.0.2-py3-none-any.whl
- Upload date:
- Size: 3.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.23.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b6d9fba27007c32914235427eba902f91b3e785eba727899f07d479f30113981
|
|
| MD5 |
88c3dfdc75bc9a4204b5389f0fe7d735
|
|
| BLAKE2b-256 |
d30b027e761a86ae53608efcc357c19fdeb0713b63fd1bfc95aacb90a08aacbe
|