> ## Documentation Index
> Fetch the complete documentation index at: https://private-04b27de1.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# autogen.coding.func_with_reqs.with_requirements

<code class="doc-symbol doc-symbol-heading doc-symbol-function" />

#### with\_requirements

```python theme={null}
with_requirements(python_packages: list[str] = [], global_imports: list[str | ImportFromModule | Alias] = []) -> Callable[[Callable[~P, ~T]], FunctionWithRequirements[~T, ~P]]
```

Decorate a function with package and import requirements

<b>Parameters:</b>

| Name              | Description                                                                                                                                                                                                                                                             |
| ----------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `python_packages` | Packages required to function.<br /><br />Can include version info..<br /><br />Defaults to \[].<br /><br />**Type:** list\[str]<br /><br />**Default:** \[]                                                                                                            |
| `global_imports`  | Required imports.<br /><br />Defaults to \[].<br /><br />**Type:** list\[str \| [ImportFromModule](/docs/api-reference/autogen/coding/func_with_reqs/ImportFromModule) \| [Alias](/docs/api-reference/autogen/coding/func_with_reqs/Alias)]<br /><br />**Default:** \[] |

<b>Returns:</b>

| Type                                                                                                                                                 | Description                                                                            |
| ---------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- |
| Callable\[\[Callable\[\~P, \~T]], [FunctionWithRequirements](/docs/api-reference/autogen/coding/func_with_reqs/FunctionWithRequirements)\[\~T, \~P]] | Callable\[\[Callable\[P, T]], FunctionWithRequirements\[T, P]]: The decorated function |

<br />
