> ## Documentation Index
> Fetch the complete documentation index at: https://docs.notte.cc/llms.txt
> Use this file to discover all available pages before exploring further.

# NotteFunction

> Notte function that can be run on the cloud or locally

Functions are saved in the notte console for easy access and versioning for users.
This is a wrapper around RemoteWorkflow that uses function\_id terminology

## Methods

### delete

```python theme={null}
delete() -> None
```

Delete the workflow from the notte console

***

### download

```python theme={null}
download(workflow_path: str | None = None, version: str | None = None, decryption_key: str | None = None, path: str | None = None) -> str
```

Download the function code from the notte console as a python file

**Returns:**

`str`

***

### fork

```python theme={null}
fork() -> 'NotteFunction'
```

Fork a shared function into your own private function

**Returns:**

[`NotteFunction`](/sdk-reference/misc/nottefunction.md)

***

### get\_curl

```python theme={null}
get_curl(variables: Any) -> str
```

Convert the workflow/run to a curl request

**Returns:**

`str`

***

### get\_run

```python theme={null}
get_run(run_id: str) -> GetFunctionRunResponse
```

Get a function run by its ID

**Returns:**

[`GetFunctionRunResponse`](/sdk-reference/misc/getfunctionrunresponse.md)

***

### get\_url

```python theme={null}
get_url(version: str | None = None, decryption_key: str | None = None) -> str
```

**Returns:**

`str`

***

### replay

```python theme={null}
replay(wait: bool = True, timeout: float = 120.0, poll_interval: float = 2.0) -> ReplayResponse
```

Get presigned URLs for the workflow run replay

**Parameters:**

* `wait`: If True (default), poll until the replay is ready.
* `timeout`: Maximum seconds to wait (default 120).
* `poll_interval`: Seconds between polling attempts (default 2).

**Returns:**

[`ReplayResponse`](/sdk-reference/misc/replayresponse.md)

***

### run

```python theme={null}
run(version: str | None = None, local: bool = False, restricted: bool = True, timeout: int | None = None, stream: bool = True, raise_on_failure: bool = True, function_run_id: str | None = None, workflow_run_id: str | None = None, log_callback: Callable[[str], None] | None = None, variables: Any) -> FunctionRunResponse
```

Run the function code using the specified version and variables

**Returns:**

[`FunctionRunResponse`](/sdk-reference/misc/functionrunresponse.md)

***

### stop\_run

```python theme={null}
stop_run(run_id: str) -> UpdateFunctionRunResponse
```

Manually stop a function run by its ID

**Returns:**

[`UpdateFunctionRunResponse`](/sdk-reference/misc/updatefunctionrunresponse.md)

***

### update

```python theme={null}
update(path: str | None = None, version: str | None = None, workflow_path: str | None = None, restricted: bool = True) -> None
```

Update the workflow with a new code version

***

## Inheritance

Inherits from: RemoteWorkflow

## Module

`notte_sdk.endpoints.functions`
