Quickstart: Create and share a notebook

  1. Go to Azure Notebooks and sign in. (For details, see Quickstart - Sign in to Azure Notebooks).

  2. From your public profile page, select My Projects at the top of the page:

    My Projects link on the top of the browser window

  3. On the My Projects page, select + New Project (keyboard shortcut: n); the button may appear only as + if the browser window is narrow:

    New Project command on My Projects page

  4. In the Create New Project popup that appears, enter or set the following details, then select Create:

    • Project name: Hello World in Python

    • Project ID: hello-world-python

    • Public project: (cleared)

    • Create a README.md: (cleared)

      New Project popup with populated details

  5. After a few moments, Azure Notebooks navigates you to the new project. Add a notebook to the project by selecting the + New drop-down (which may appear as only +), then selecting Notebook:

  6. In the Create New Notebook popup that appears, enter a filename for your notebook, such as HelloWorldInPython.ipynb (.ipynb means IronPython (Jupyter) Notebook), and select Python 3.6 for the language (also referred to as the kernel):

    The Create New Notebook popup

  7. Select New to finish creating the notebook, which then appears in your project's file list:

    New notebook appearing in the project's file list

Run the notebook

  1. Select the new notebook to run it in the editor; the kernel you selected (Python 3.6 in this example) is automatically activated for this notebook:

    View of a new notebook in Azure Notebooks

  2. By default, the notebook has one empty code cell. To change the cell type to Markdown, use the cell type drop-down to select Markdown:

    Changing the cell type in a new notebook

  3. Enter or paste the following heading text into the cell:

    # Hello World in Python
  4. Because you're editing Markdown, the text appears as a header with the "#". To render the Markdown into HTML, select the Run button. Azure Notebooks then automatically creates a new code cell afterwards:

    The run button for a cell and rendered Markdown

  5. In the code cell, enter the following Python code:

    from datetime import datetime
    now = datetime.now()
    msg = "Hello, Azure Notebooks! Today is %s"  % now.strftime("%A, %d %B, %Y")
  6. Select Run (keyboard shortcut: Shift+Enter) to run the code. Below the cell you should see successful output similar to the following text:

    Hello, Azure Notebooks! Today is Thursday, 15 November, 2018
  7. Select the save icon to save your work:

    Save icon on the Jupyter notebook toolbar

  8. Select the File > Close and Halt menu command to stop the server and close the browser window.

Share the notebook

To share your notebook, switch back to the project page if needed, right-click the notebook file, select Copy Link (keyboard shortcut: y), and paste that link into an appropriate message (email, IM, etc.).

On the project page, you can also use the Share menu to obtain a link, create an email message with the link, or obtain HTML and Markdown embed code:

Project share command

Next steps