Skip to main content

A Jupyter notebook kernel for CFML powered by Commandbox

Project description

Jupyter Kernel for CFML

This a Jupyter Kernel for CFML powered by the CommandBox REPL. It should work on Window, Linux, and MacOS but I have not done extensive testing on them. You can also try it out on mybinder.org.

It is based on the concept of a Python wrapper kernel. It is a work it progress so likley has some functionality missing that other Kernels may provide. I am new to Python so there are probably a lot of things that can be improved here.

Requirements

Python

If you want to run it locally you will need to have Python installed. I installed it on Windows using the Chocolatey package manager.

choco install python

CommandBox

You will also need to make sure CommandBox is installed and in the system path.

Jupyter

You will need to have Jupyter installed or you can also use the VS Code Jupyter notebook extension.

Docker

You can also run it with Docker if you do not want to mess around with installing dependencies. There is a docker image associated with the repository that can be utilized for running it was well. See the other options below.

Clone the repo

git clone https://github.com/jsteinshouer/cfml-jupyter-kernel.git

Install Kernel

pip install ./cfml-jupyter-kernel
python -m cfml_kernel.cfscript.install
python -m cfml_kernel.cfml.install

If you want to develop on the Kernel you can add the -e flag to make it editable.

pip install -e ./cfml-jupyter-kernel
python -m cfml_kernel.cfscript.install
python -m cfml_kernel.cfml.install

Run it

I prefer to use the VS Code Jupyter notebook extension to run my notebooks but if you installed Jupyter to can run it using this command:

jupyter notebook

Run on mybinder.org

You can try it out and create CFML notebooks using this link:

Binder

Github Codespaces / Dev Container

You can fork this repo and run it with Github Codespaces or clone the repo and run it locally with the VS Code Dev Containers extension.

Running locally with Docker

If you have cloned the repo you can just use docker compose to run it.

docker compose up

Go to http://127.0.0.1:8888/lab?token=123 to access the Jupyter Lab application.

However there is a pre-built image you can use instead. This will run the Jupyter lab application using the pre-built image.

docker run -v ${PWD}:/home/jovyan/work -p 8888:8888 -e JUPYTER_TOKEN=123 ghcr.io/jsteinshouer/cfml-jupyter:latest

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cfml_kernel-1.2.1.tar.gz (8.2 kB view hashes)

Uploaded Source

Built Distribution

cfml_kernel-1.2.1-py3-none-any.whl (10.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page