No project description provided
Project description
Jupyter Client Fun
Learning how to use the jupyter_client API to interact with jupyter kernels.
Mental Model
This is a program that can be used to interact with kernels. For example, quarto interacts with kernels. This is not code relating to the implementation of a jupyter kernel.
Jupyter Plugin Goal
- Listing all kernels that are available in the kernelspec list
- Run an arbitrary block of code in our kernel
Jupyter Notebook Visualization
Before we can even go ahead and write a plugin for dealing with notebooks, We need to actually visualize a given notebook.
Question: How???
How the hell are we going to actually visualize this? In it's own buffer. Anytime we open up a new ipynb document, we need to open up a new custom popup buffer. Let's start there.
Lua Implementation
- Get a jupyter notebook into this project.
- Create a new popup buffer when we open up a notebook file.
Python Implementation
- Startup a new program that can write contents to nvim
- Load in a notebook using the nbformat library
- Add new code or markdown cells
- Display the cells of a given notebook
- Display cell's outputs
- Convert markdown to a clean format using
render-markdown.nvim
- Actually execute the code inside of a single cell
- Write the cells of a jupyter notebook to an nvim buffer
Design Goals
Ok, I don't want to just spin around in circles so let's try and think about precisely what I want to accomplish
Viewing Jupyter Notebooks
Before we even start to think about interactivity (which is definitely a design goal!!), we want to first be able to OPEN a jupyter notebook in nvim.
When we open up a notebook for now we see a giant json document - well because that's precisely what a notebook is - but I'd much rather see the markdown alongside code - like what we see in a traditional editor. I don't want to have to leave my editor to view the contents of a notebook.
Architecture
We are going to use an editable markdown file to represent a jupyter notebook.
When opening up a new jupyter notebook, we are going to actually open up the markdown file.
We can use that markdown file to execute jupyter code.
Hopefully we will eventually be able to execute any code that we want in this markdown file.
Goals
- Convert a jupyter notebook to a markdown representation
- Execute the cells in our kernel
- Support multiple kernels in a single markdown file.
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 jupyter_http_manager-0.1.0.tar.gz.
File metadata
- Download URL: jupyter_http_manager-0.1.0.tar.gz
- Upload date:
- Size: 9.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.11.8 Linux/6.2.0-39-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
93e7125b348aa8b3f39d891f8f01843142a3458248d34455fe97b9f44d057c1c
|
|
| MD5 |
c2a44f7ccb63809150e5f2c4e2e16d53
|
|
| BLAKE2b-256 |
5383f939468fd7f36dc449f89f8c91c7456f036abae35dbe29818c0e125719d0
|
File details
Details for the file jupyter_http_manager-0.1.0-py3-none-any.whl.
File metadata
- Download URL: jupyter_http_manager-0.1.0-py3-none-any.whl
- Upload date:
- Size: 11.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.11.8 Linux/6.2.0-39-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1597006ad80f85ae89b289920eff7d5099d4ca457e358810916426fcced277ae
|
|
| MD5 |
f70eb5bf29220ed41f2d17f36da89c69
|
|
| BLAKE2b-256 |
e6262f7b54b38a919471efa97cea970561f77e07309afe9b7b75af106821af10
|