> For the complete documentation index, see [llms.txt](https://docs.dbnl.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.dbnl.com/v0.21.x/using-distributional/python-sdk/sdk-functions/run-config/get_run_config-2.md). Agents can also search and read this documentation through its [MCP server](https://docs.dbnl.com/~gitbook/mcp).

# get\_run\_config\_from\_latest\_run

Retrieve a dbnl RunConfig from the most recent Run in a Project

<pre class="language-python"><code class="lang-python">dbnl.get_run_config(
    *,
    project: <a data-footnote-ref href="#user-content-fn-1">Project</a>,
) -> <a data-footnote-ref href="#user-content-fn-2">RunConfig</a>:
</code></pre>

## Parameters

<table><thead><tr><th width="274">Arguments</th><th>Description</th></tr></thead><tbody><tr><td><code>project</code></td><td>The <a href="https://docs.dbnl.com/v0.21.x/using-distributional/python-sdk/sdk-objects/project.md">Project</a> the most recent Run is associated with.</td></tr></tbody></table>

## Returns

| Type                                                                                                | Description                                                 |
| --------------------------------------------------------------------------------------------------- | ----------------------------------------------------------- |
| [RunConfig](https://docs.dbnl.com/v0.21.x/using-distributional/python-sdk/sdk-objects/runconfig.md) | The dbnl RunConfig from the most recent run in the Project. |

## Examples

```python
import dbnl
dbnl.login()


proj1 = dbnl.get_or_create_project(name="test_p1")
runcfg1 = dbnl.create_run_config(project=proj1, columns=[{"name": "error", "type": "float"}])
run1 = dbnl.create_run(
    project=proj1, 
    run_config=runcfg1, 
)
# Retrieving the RunConfig by ID
runcfg2 = dbnl.get_run_config_from_latest_run(project=proj1)
assert runcfg1.id == runcfg2.id

```

[^1]: [Project](https://docs.dbnl.com/v0.21.x/using-distributional/python-sdk/sdk-objects/project.md)

[^2]: [RunConfig](https://docs.dbnl.com/v0.21.x/using-distributional/python-sdk/sdk-objects/runconfig.md)
