Skip to main content

TabNine for Jupyter Notebook

This extension for Jupyter Notebook enables the use of coding auto-completion based on Deep Learning.

Other client plugins of TabNine require starting a child process for TabNine binary and using Pipe for communication. This can’t be done with Jupyter Notebook, since child process can’t be created with JQuery and Jupyter Notebook doesn’t provide any way for adding third-part js libs to plugins.

In this repository, it is achived by developing a client plugin and a server plugin for Jupyter Notebook. The client plugin generate request info and send http request to the server plugin. The server plugin pass the request info to it’s client process (TabNine) and return the request to client plugin.

Installation

The extension consists of a pypi package that includes a javascript notebook extension, along with a python jupyter server extension. Since Jupyter 4.2, pypi is the recommended way to distribute nbextensions. The extension can be installed

  • from the master version on the github repo (this will be always the most recent version)

  • via pip for the version hosted on pypi

From the github repo or from Pypi,

  1. install the package

    • pip3 install https://github.com/wenmin-wu/jupyter-tabnine/archive/master.zip [--user][--upgrade]

    • or pip3 install jupyter-tabnine [--user][--upgrade]

    • or clone the repo and install git clone https://github.com/wenmin-wu/jupyter-tabnine.git

      python3 setup.py install

  2. install the notebook extension

    jupyter nbextension install --py jupyter_tabnine [--user|--sys-prefix|--system]
  3. and enable notebook extension and server extension

    jupyter nbextension enable --py jupyter_tabnine [--user|--sys-prefix|--system]
    jupyter serverextension enable --py jupyter_tabnine [--user|--sys-prefix|--system]

For Jupyter versions before 4.2, the situation after step 1 is more tricky, since the --py option isn’t available, so you will have to find the location of the source files manually as follows (instructions adapted from [@jcb91](https://github.com/jcb91)’s jupyter_highlight_selected_word). Execute

python -c "import os.path as p; from jupyter_tabnine import __file__ as f, _jupyter_nbextension_paths as n; print(p.normpath(p.join(p.dirname(f), n()[0]['src'])))"

Then, issue

jupyter nbextension install <output source directory>
jupyter nbextension enable jupyter_tabnine/jupyter_tabnine

where <output source directory> is the output of the first python command.

Tips

  • A shortcut is added to let you switch between Jupyter raw completion and TabNine auto-competion. Just enter shift + space when you want raw completion of Jupyter :)

  • Remote auto-completion server is also supported. You may want this to speed up the completion request handing. Or maybe your company want to deploy a compeltion server cluster that services everyone. Refer https://github.com/wenmin-wu/jupyter-tabnine to learn how to deploy remote server.

Release files for jupyter-tabnine 1.2.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for jupyter-tabnine 1.2.3
File Size Uploaded
jupyter_tabnine-1.2.3.tar.gz 14.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for jupyter-tabnine 1.2.3
File Interpreter ABI Platform
jupyter_tabnine-1.2.3-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 36.0 kB

Release files / jupyter_tabnine-1.2.3.tar.gz

Download URL jupyter_tabnine-1.2.3.tar.gz
Size 14.2 kB
Tags Source
SHA-256 checksum
How to use checksums
f066e6bbc5a25cf5390849bf82359356a532a2d170dd388d2aaa7b3dfa838308
BLAKE2b-256 checksum
How to use checksums
f8b9a68d61937fc11ba7064faba971d096eb51947ad05b3916382bd8c41ae286
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.1 CPython/3.9.6

Release files / jupyter_tabnine-1.2.3-py2.py3-none-any.whl

Download URL jupyter_tabnine-1.2.3-py2.py3-none-any.whl
Size 21.7 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
0a49f0f64f71e0a892c260a089fd0b32e8b5a6ac4f3c3125345c3fe38ed5880d
BLAKE2b-256 checksum
How to use checksums
c1ced3569288d6af50ef99b701a1ea9951b4aeb683fbe1d3cc6937ccffd284f2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.1 CPython/3.9.6

Release history Release notifications | RSS feed

This release

1.2.3 This release

2 release files

1.2.2

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.0

1 release file

1.0.2

1 release file

1.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page