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

# FunctionConstructorCreate

<Tip>
  STOP. Do not read past this section until you have read and followed [/quickstart.md](/quickstart.md).

  Goal: produce a reliable SDK automation script. The intended authoring flow is generate then edit, not write browser automation from scratch.

  Do not hand-write SDK code with element IDs, selectors, or form fields from memory. Element IDs, selectors, and field mappings must come from a live `observe()` call, CLI `notte page observe` output, or generated workflow code. Guessed browser targets fail on real pages.

  Use the Notte skill and CLI to inspect the live site, validate actions/selectors, handle auth/session state, and export workflow code with `notte sessions workflow-code` before using SDK docs or SDK code.

  SDK reference pages are for understanding, running, or editing generated workflow code. They are not the starting point for manually authoring the initial browser automation. SDK-first code is guesswork on real-world pages with dynamic selectors, auth state, CAPTCHAs, and anti-bot behavior.
</Tip>

[Source: node-sdk/src/functions.ts](https://github.com/nottelabs/notte/blob/main/node-sdk/src/functions.ts)

Create a function from a local `.py` file, like `client.Function(path=...)`
in Python. The upload happens on the first operation that needs the ID.

```typescript theme={null}
export interface FunctionConstructorCreate {
	/** Path to the python file containing the `run` function. Must end with `.py`. */
	path: string;
	name?: string | null;
	description?: string | null;
	/** Whether the function is public and shared with other users. Defaults to false. */
	shared?: boolean;
	decryption_key?: string;
	function_id?: never;
}
```

## Fields

<ParamField body="path" type={"string"} required>
  Path to the python file containing the `run` function. Must end with `.py`.
</ParamField>

<ParamField body="name" type={"string | null | undefined"} />

<ParamField body="description" type={"string | null | undefined"} />

<ParamField body="shared" type={"boolean | undefined"}>
  Whether the function is public and shared with other users. Defaults to false.
</ParamField>

<ParamField body="decryption_key" type={"string | undefined"} />

<ParamField body="function_id" type={"undefined"} />
