This extension exposes the jquery and datatables.net libraries and css as static files in Jupyter Lab.
The purpose of doing this is to allow the itables package to have an offline mode in Jupyter Lab.
Install it in the Python environment you use to launch Jupyter Lab with:
pip install jupyterlab-itables
Then relaunch Jupyter Lab with
jupyter lab
Assuming that Jupyter Lab is running on port 8888, you will be able to access the static files at e.g.
- http://localhost:8888/static/itables/jquery/dist/jquery.min.js
- http://localhost:8888/static/itables/datatables.net-dt/css/jquery.dataTables.min.css
- http://localhost:8888/static/itables/datatables.net/js/jquery.dataTables.mjs
Assuming that you have conda and mamba, you can create a minimal Jupyter Lab environment with
mamba env create --file environment.yml
or update it with
mamba env update --file environment.yml
Activate that environment with
conda activate jupyterlab-itables-dev
Then build the extension in development mode with
pip install -ve .
In development mode the extension needs to be enabled manually with:
jupyter server extension enable --py jupyterlab_itables
Clean the project files with
rm -rf node_modules jupyterlab_itables/static dist build package-lock.json
Upgrade the version number in setup.py
, then:
python setup.py sdist bdist_wheel
Check the size and the contents of the .tar.gz
file in the dist
folder,
and then upload it to pypi with
twine upload dist/jupyterlab-itables-xxx.tar.gz