# tmuxp.workspace.options.PaneReadiness.from_config

- **Module:** tmuxp.workspace.options.PaneReadiness
- **Package:** tmuxp
- **Language:** Python
- **Kind:** method
- **Source:** https://github.com/tmux-python/tmuxp/blob/153acdf6ff1268b14d3d03ed488f545a7123c8f1/src/tmuxp/workspace/options.py#L47
- **Page:** https://libtmux.org/en/py/latest/workspace/reference/tmuxp-workspace-options-panereadiness-from_config/

```
tmuxp.workspace.options.PaneReadiness.from_config(cls, value: t.Any) -> PaneReadiness
```

Parse a ``pane_readiness`` config value into a policy.

Accepts the canonical ``auto`` / ``always`` / ``never`` strings, plus
the truthy/falsy aliases users expect from boolean-like config keys.

## Parameters

- `cls`
- `value` (t.Any): value from ``workspace_builder_options.pane_readiness``; ``None``
(key absent) resolves to
:attr:`~tmuxp.workspace.options.PaneReadiness.AUTO`

## Returns

PaneReadiness

## Example

```python
>>> PaneReadiness.from_config(None) is PaneReadiness.AUTO
True
>>> PaneReadiness.from_config("auto") is PaneReadiness.AUTO
True
>>> PaneReadiness.from_config(True) is PaneReadiness.ALWAYS
True
>>> PaneReadiness.from_config("on") is PaneReadiness.ALWAYS
True
>>> PaneReadiness.from_config(1) is PaneReadiness.ALWAYS
True
>>> PaneReadiness.from_config(False) is PaneReadiness.NEVER
True
>>> PaneReadiness.from_config("never") is PaneReadiness.NEVER
True
```

## Example

Unknown values raise an actionable error:

```python
>>> PaneReadiness.from_config("sometimes")
Traceback (most recent call last):
...
ValueError: invalid pane_readiness value: 'sometimes'; expected one of:
auto, always/true/on/yes/1, never/false/off/no/0
```
