Skip to main content
Read the Notte skill and follow its setup instructions when setting up Notte or building browser automation. This is the shared source for CLI setup, authentication, and the browser-to-code workflow.
Source: node-sdk/src/functions.ts Cloud function saved in the Notte console, the counterpart of notte.Function in Python.

Create NotteFunction

Use NotteClient.NotteFunction to create this object from your configured client.
FunctionConstructor
required

Usage

  • createRun: Create a cloud run record without starting execution, like function.create_run() in Python. Use this only when you need the ID before execution, then pass it to run(variables, { functionRunId }). run() otherwise creates a new run on its own.
  • run: Run the function on the cloud and wait for its result, streaming logs by default like function.run(**variables) in Python.
  • getRun: Get metadata for a specific function run.
  • download: Download the function code as a python file. Returns the code, and writes it to path when one is provided.
  • getUrl: Get the download URL of the function code, decrypting it when the API returns an encrypted one (Notte managed functions).
  • get: Get the function metadata together with its download URL, the counterpart of client.functions.get() in Python.
  • update: Upload a new version of the code, mirroring function.update(path=...).
  • updateMetadata: Update the function metadata (name, description, default runtime, …).
  • delete: Delete the function from the Notte console.
  • setSchedule: Schedule the function to run on a cron expression.
  • deleteSchedule: Remove the function schedule.
  • rollback: Roll the function back to a previous version.
  • updateRun: Update a run, uploading fields above 1 MiB directly to private storage.
  • runs: List the runs of this function.
NotteClient
required
FunctionConstructor
required

decryptionKey

functionId

The function ID. Throws before a path-constructed function has been uploaded.