Utility to install various jupyter kernel specs.
Project description
Install Kernel Specifications into userspace
This code installs jupyter kernels for different languages into the user space. Once the kernel has been installed it can be used on the jupyter-hub server of DKRZ.
Installation
python3 -m pip install jupyter-kernel-install
Usage
Using the command line interface (cli):
jupyter-kernel-install --help
Usage: jupyter-kernel-install [-h] [--name NAME] [--display-name DISPLAY_NAME] [--version] language
Install jupyter kernel specs of different languages.
Positional Arguments:
language The programming language
Options:
-h, --help show this help message and exit
--name, -n NAME The name of the kernel (default: None)
--display-name, -d DISPLAY_NAME
The display name of the kernel (default: None)
--version, -V Display version and exit
Alternatively you can use:
python -m jupyter_kernel_install --help
The following kernel specifications are supported:
- python3
- gnuR
- bash
Example for installing a gnuR kernel:
jupyter-kernel-install r --name r-regiklim --display-name "R for Regiklim"
Using the python library
Example for programmatically installing a bash kernel:
import jupyter_kernel_install as ki
kernel_path = ki.bash(name="bash-regiklim", display_name="bash kernel")
Contributing
Any contributions are welcome. To start developing we recommend creating a new mini conda environment.
conda env create -f environment.yml; conda activate install-kernelspec
Unit tests, building the documentation, type annotations and code style tests are done with tox. To run all tests, linting in parallel simply execute the following command:
tox -p 3
You can also run the each part alone, for example to only check the code style:
tox -e lint
available options are lint
, types
and test
.
Tox runs in a separate python environment to run the tests in the current environment use:
pytest
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 jupyter_kernel_install-2407.0.1.tar.gz
.
File metadata
- Download URL: jupyter_kernel_install-2407.0.1.tar.gz
- Upload date:
- Size: 11.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7b9760b08d008d513a698e7670a3a0ba3c1dee33ddbe4a2c9073dc586cdfd15c |
|
MD5 | c1dc369684717b1102413ba98abfd1f3 |
|
BLAKE2b-256 | 6537df998c835f8822dbee6e8b670a071aca6e9ddcc55a73d36cba5946bd6d51 |
File details
Details for the file jupyter_kernel_install-2407.0.1-py3-none-any.whl
.
File metadata
- Download URL: jupyter_kernel_install-2407.0.1-py3-none-any.whl
- Upload date:
- Size: 10.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5e43229be62c06d56c73fa5f126d3e6f534d91616971a80607fa1c11e31d2965 |
|
MD5 | 6ad496f839354040a9b69a70e1e5c6fd |
|
BLAKE2b-256 | 0795088dafe932147e0bcc2c7e407d03697b2eac7bba1959931728eb7dabaf02 |