<p align="center">
Xonsh kernel for Jupyter Notebook and Jupyter Lab allows to execute
xonsh shell commands in a notebook cell.
</p>
<p>
<img src="https://repository-images.githubusercontent.com/471969357/59a14abc-8966-4d97-a40c-80a4d444238c">
</p>
<p align="center">
If you like the idea click ⭐ on the repo and <a href="https://twitter.com/intent/tweet?text=Nice%20xontrib%20for%20the%20xonsh%20shell!&url=https://github.com/xonsh/xontrib-jupyter" target="_blank">tweet</a>.
</p>
## Installation
To install use [xpip](https://xon.sh/aliases.html#xpip):
```xsh
xpip install xontrib-jupyter
# or: xpip install -U git+https://github.com/xonsh/xontrib-jupyter
xontrib load jupyter
xonfig jupyter-kernel --help # Options for installing.
xonfig jupyter-kernel --user # Install kernel spec in user config directory.
```
Check the installation:
```xsh
jupyter kernelspec list
# Available kernels:
# python3 /opt/homebrew/lib/python3.11/site-packages/ipykernel/resources
# xonsh /PATH_TO_ENV_PREFIX/share/jupyter/kernels/xonsh
xontrib load jupyter
xonfig jupyter-kernel
# Installing Jupyter kernel spec:
# root: None
# prefix: /PATH_TO_ENV_PREFIX/
# as user: False
xonfig info
#| jupyter | True
#| jupyter kernel | /PATH_TO_ENV_PREFIX/share/jupyter/kernels/xonsh
```
## Usage
### Jupyter
Just run [Jupyter Notebook or JupyterLab](https://jupyter.org/) and choose xonsh:
```xsh
jupyter notebook
# or
jupyter lab
```
### Euporie
[Euporie](https://github.com/joouha/euporie) is a terminal based interactive computing environment.
```xsh
euporie-notebook --kernel-name xonsh # or change the kernel in UI
# or
euporie-console --kernel-name xonsh # or change the kernel in UI
```
## Testing
- install the project with its dependencies
```bash
poetry install
poetry install --only-root
```
- now start the xonsh shell
```sh
xonsh --no-rc
```
- inside the xonsh shell, you can load the jupyter xontrib and install the kernel
```sh
xontrib load jupyter
# this will install the kernel
xonfig jupyter-kernel --user
# now start a notebook and choose xonsh kernel
jupyter notebook
```
## Releasing your package
1. Bump the version of the package `poetry version patch` (or minor/major)
2. Push the changes to the repo and publish with
```bash
poe release
```
3. The release notes are automatically generated as a draft release after each PR.
4. Create a GitHub release from the draft release against the newly pushed tag
5. Publish the package with `poetry publish`
## Known issues
### Uncaptured output
Some tools like [AWS CLI](https://aws.amazon.com/cli/) using the uncapturable `less` pager to show the output by default. In these cases you need to find the way to disable the pager e.g. set [`$AWS_PAGER = 'cat'`](https://docs.aws.amazon.com/cli/latest/userguide/cli-usage-pagination.html#cli-usage-pagination-awspager) for AWS CLI.
## Credits
* This package was created with [xontrib cookiecutter template](https://github.com/xonsh/xontrib-cookiecutter).
* [awesome-jupyter](https://github.com/markusschanta/awesome-jupyter) - A curated list of awesome Jupyter projects, libraries and resources.
Raw data
{
"_id": null,
"home_page": "https://github.com/xonsh/xontrib-jupyter",
"name": "xontrib-jupyter",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": "",
"keywords": "xontrib,xonsh",
"author": "Xonsh Dev",
"author_email": "jnoortheen@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/5f/b8/325fab17fc737c94b9a720f256e9f9e15c1fe7891c7f7544772a6ad4b7bc/xontrib_jupyter-0.3.0.tar.gz",
"platform": null,
"description": "<p align=\"center\">\nXonsh kernel for Jupyter Notebook and Jupyter Lab allows to execute\nxonsh shell commands in a notebook cell.\n</p>\n\n<p>\n<img src=\"https://repository-images.githubusercontent.com/471969357/59a14abc-8966-4d97-a40c-80a4d444238c\">\n</p>\n\n<p align=\"center\">\nIf you like the idea click \u2b50 on the repo and <a href=\"https://twitter.com/intent/tweet?text=Nice%20xontrib%20for%20the%20xonsh%20shell!&url=https://github.com/xonsh/xontrib-jupyter\" target=\"_blank\">tweet</a>.\n</p>\n\n\n## Installation\n\nTo install use [xpip](https://xon.sh/aliases.html#xpip):\n\n```xsh\nxpip install xontrib-jupyter\n# or: xpip install -U git+https://github.com/xonsh/xontrib-jupyter\n\nxontrib load jupyter\nxonfig jupyter-kernel --help # Options for installing.\nxonfig jupyter-kernel --user # Install kernel spec in user config directory.\n```\n\nCheck the installation:\n```xsh\njupyter kernelspec list\n# Available kernels:\n# python3 /opt/homebrew/lib/python3.11/site-packages/ipykernel/resources\n# xonsh /PATH_TO_ENV_PREFIX/share/jupyter/kernels/xonsh\n\nxontrib load jupyter\nxonfig jupyter-kernel\n# Installing Jupyter kernel spec:\n# root: None\n# prefix: /PATH_TO_ENV_PREFIX/\n# as user: False\n\nxonfig info\n#| jupyter | True\n#| jupyter kernel | /PATH_TO_ENV_PREFIX/share/jupyter/kernels/xonsh\n\n```\n\n## Usage\n\n### Jupyter\n\nJust run [Jupyter Notebook or JupyterLab](https://jupyter.org/) and choose xonsh:\n\n```xsh\njupyter notebook\n# or\njupyter lab\n```\n\n### Euporie\n\n[Euporie](https://github.com/joouha/euporie) is a terminal based interactive computing environment.\n\n```xsh\neuporie-notebook --kernel-name xonsh # or change the kernel in UI\n# or\neuporie-console --kernel-name xonsh # or change the kernel in UI\n```\n\n## Testing\n\n- install the project with its dependencies\n```bash\npoetry install\npoetry install --only-root\n```\n- now start the xonsh shell\n\n```sh\nxonsh --no-rc\n```\n\n- inside the xonsh shell, you can load the jupyter xontrib and install the kernel\n\n```sh\nxontrib load jupyter\n\n# this will install the kernel\nxonfig jupyter-kernel --user\n\n# now start a notebook and choose xonsh kernel\njupyter notebook\n```\n\n## Releasing your package\n\n1. Bump the version of the package `poetry version patch` (or minor/major)\n2. Push the changes to the repo and publish with\n\n ```bash\n poe release\n ```\n\n3. The release notes are automatically generated as a draft release after each PR.\n4. Create a GitHub release from the draft release against the newly pushed tag\n5. Publish the package with `poetry publish`\n\n## Known issues\n\n### Uncaptured output\n\nSome tools like [AWS CLI](https://aws.amazon.com/cli/) using the uncapturable `less` pager to show the output by default. In these cases you need to find the way to disable the pager e.g. set [`$AWS_PAGER = 'cat'`](https://docs.aws.amazon.com/cli/latest/userguide/cli-usage-pagination.html#cli-usage-pagination-awspager) for AWS CLI.\n\n## Credits\n\n* This package was created with [xontrib cookiecutter template](https://github.com/xonsh/xontrib-cookiecutter).\n* [awesome-jupyter](https://github.com/markusschanta/awesome-jupyter) - A curated list of awesome Jupyter projects, libraries and resources.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Xonsh kernel for Jupyter Notebook and Jupyter Lab allows to execute xonsh shell commands in a notebook cell",
"version": "0.3.0",
"project_urls": {
"Code": "https://github.com/xonsh/xontrib-jupyter",
"Documentation": "https://github.com/xonsh/xontrib-jupyter/blob/master/README.md",
"Homepage": "https://github.com/xonsh/xontrib-jupyter",
"Issue tracker": "https://github.com/xonsh/xontrib-jupyter/issues",
"Repository": "https://github.com/xonsh/xontrib-jupyter"
},
"split_keywords": [
"xontrib",
"xonsh"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "6899af26411f1a86ebc31a04316ca458cf048406ced95e645f9593a82edcc17c",
"md5": "fbb556ffeecdd7c516083e431e518b5c",
"sha256": "04348aa2adcd598998a353803a008f9f76571e9d4e09fd6629281f937b92fec9"
},
"downloads": -1,
"filename": "xontrib_jupyter-0.3.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "fbb556ffeecdd7c516083e431e518b5c",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 11498,
"upload_time": "2023-05-25T10:21:45",
"upload_time_iso_8601": "2023-05-25T10:21:45.547111Z",
"url": "https://files.pythonhosted.org/packages/68/99/af26411f1a86ebc31a04316ca458cf048406ced95e645f9593a82edcc17c/xontrib_jupyter-0.3.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "5fb8325fab17fc737c94b9a720f256e9f9e15c1fe7891c7f7544772a6ad4b7bc",
"md5": "e3c026ee4b5054720de2f6b32245930c",
"sha256": "17735c756e4e74a440b7e88b374176b7864247c13e1c33a843070207b6fc69f5"
},
"downloads": -1,
"filename": "xontrib_jupyter-0.3.0.tar.gz",
"has_sig": false,
"md5_digest": "e3c026ee4b5054720de2f6b32245930c",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 11972,
"upload_time": "2023-05-25T10:21:47",
"upload_time_iso_8601": "2023-05-25T10:21:47.652017Z",
"url": "https://files.pythonhosted.org/packages/5f/b8/325fab17fc737c94b9a720f256e9f9e15c1fe7891c7f7544772a6ad4b7bc/xontrib_jupyter-0.3.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-05-25 10:21:47",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "xonsh",
"github_project": "xontrib-jupyter",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "xontrib-jupyter"
}