> ## 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.CodeExecutorFactory

<h2 id="autogen.coding.CodeExecutorFactory" class="doc doc-heading">
  <code class="doc-symbol doc-symbol-heading doc-symbol-class" />

  <span class="doc doc-object-name doc-class-name">CodeExecutorFactory</span>
</h2>

```python theme={null}
CodeExecutorFactory()
```

(Experimental) A factory class for creating code executors.

### Static Methods

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

#### create

```python theme={null}
create(code_execution_config: CodeExecutionConfig) -> CodeExecutor
```

(Experimental) Get a code executor based on the code execution config.<br />

<b>Parameters:</b>

| Name                    | Description                                                                                                                                                                                                                                                                                                                                            |
| ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `code_execution_config` | The code execution config, which is a dictionary that must contain the key "executor".<br /><br />The value of the key "executor" can be either a string or an instance of CodeExecutor, in which case the code executor is returned directly.<br /><br />**Type:** [CodeExecutionConfig](/docs/api-reference/autogen/coding/base/CodeExecutionConfig) |

<b>Returns:</b>

| Type                                                            | Description                      |
| --------------------------------------------------------------- | -------------------------------- |
| [CodeExecutor](/docs/api-reference/autogen/coding/CodeExecutor) | CodeExecutor: The code executor. |

<br />
