Codeium in Jupyter

Install the Codeium extension in Jupyter, and start seeing suggestions as you write comments and code.

Install Codeium

1

Install Jupyter Extension

Open a new Jupyter lab. In a cell, paste the following code and run it (Shift + Enter). This will install the pip package and Jupyter extension needed to use Codeium. If you want to upgrade the extension to the latest version, simply rerun this command.
import sys
!{sys.executable} -m pip install -U pip --user
!{sys.executable} -m pip install -U codeium-jupyter --user
If you are running Jupyter inside a virtual environment, run this instead:
import sys
!{sys.executable} -m pip install -U pip
!{sys.executable} -m pip install -U codeium-jupyter
When the commands have finished running, close the notebook and quit the Jupyter server.

2

Launch Jupyter

Now relaunch Jupyter and open a new or existing notebook. Navigate to the Codeium section of the settings menu (Ctrl + ,). You should see two empty fields, one for an enterprise URL and one for a token.

Then, edit the Authentication Token (keep the Enterprise Portal URL blank). Follow the popup link to get a new authentication token.

Tip: If you do not see the settings, that likely means that you did not restart the Jupyter server. Make sure to Ctrl+C the process and restart the server using the jupyter lab command.

3

Create Account

If you do not have a Codeium account yet, you will be redirected to create an account.

Why do we require an account? In order to remove abuse of the product and make sure that we know you are an early user, we ask to authorize Codeium extensions with an account before use. We do not use, share, or sell any identifying information for any purpose.

4

Authenticate

If you were signed in, the Get Auth Token button will redirect to a page with a token. Then paste your provided token into the settings menu.

5

All Done!

You're all set to use Codeium!

Use Codeium

1

From Code

Codeium can suggest multiple lines of code given a fragment of code that you write! Give the following simple header a shot:
def fib(n):
Codeium should generate an entire function body in grayed text, giving you a working implementation for the Nth Fibonacci number!
Note: You may get slightly different results. This is due to a constantly improving model and sampling to increase the diversity of code generated.

2

Accept Suggestion

If you like the suggestion, just press Tab to accept.

3

From Comments

Codeium can also understand comments, allowing you to get code from just a description of the desired functionality! Let's try the earlier example, except instead just write a comment and def, the Python keyword for functions:
# Nth Fibonacci number
def 
Codeium should generate not just the function body as before, but also the function header!