# as_toml_table

> **Function** in `deepagents_code`

📖 [View in docs](https://reference.langchain.com/python/deepagents-code/configuration/theme_resolution/as_toml_table)

Return `value` as a TOML table when it has the expected runtime shape.

`tomllib` parses TOML tables as string-keyed dicts, which `ty` cannot infer
from a runtime `dict` check. Keep the cast at this boundary so it does not
become a general-purpose escape hatch - now more important, not less, since
the helper became importable from a shared module.

## Signature

```python
as_toml_table(
    value: object,
) -> dict[str, object] | None
```

---

[View source on GitHub](https://github.com/langchain-ai/deepagents/blob/2069079e09546060f5b52b2cd4f0e3c813e820f3/libs/code/deepagents_code/configuration/theme_resolution.py#L49)