Skip to main content
Use Notebooks to run Python driver scripts for backfills, continuous updates, or batch computation. Open a Space where you have edit access; this example uses demo.

Create a script

  1. Open Notebooks in the sidebar and click + at the top right of the list.
  2. Enter notebook_basics as the Notebook name.
  3. Click Save and open to open the editor.
Dialog for creating notebook_basics

Write and save

Enter this code in the editor:
The script converts a raw USDC amount into tokens. get_arguments() reads run parameters and defaults to 1500000 if raw_amount is absent. Parameter values are strings, so the script converts the value to int first. Click Save at the top after editing. When unsaved changes disappears, the changes have been saved.

Run and view output

Select a compute specification at the bottom, such as 0.25 vCPU / 1 GB, and click Run. When the script finishes, Output shows:
Notebook editor and USDC conversion result in Output
To enter a different raw_amount in the UI, add a parameter with that name and set its value. See Manage runs.