# libtmux.neo.fetch_objs

- **Module:** libtmux.neo
- **Package:** libtmux
- **Language:** Python
- **Kind:** function
- **Source:** https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/neo.py#L1039
- **Page:** https://libtmux.org/en/py/latest/reference/libtmux-neo-fetch_objs/

```
libtmux.neo.fetch_objs(server: Server, list_cmd: ListCmd, list_extra_args: ListExtraArgs = None, filter: str | None = None, # noqa: A002) -> OutputsRaw
```

Fetch a listing of raw data from a tmux command.

Runs a tmux list command (e.g. ``list-sessions``) with the format string
from :func:`get_output_format` and parses each line of output into a dict.

## Parameters

- `server` (Server): The tmux server to query.
- `list_cmd` (ListCmd): The tmux list command to run, e.g. ``"list-sessions"``,
``"list-windows"``, or ``"list-panes"``.
- `list_extra_args` (ListExtraArgs): Extra arguments appended to the tmux command (e.g. ``("-a",)``
for all windows/panes, or ``["-t", session_id]`` to filter).
- `filter` (str | None): Filter expression evaluated by tmux (``-f`` flag). tmux omits rows
whose expanded expression is false before libtmux parses the result.
tmux silently expands a malformed filter (unclosed ``#{...}``,
unknown format token) to empty, which is treated as false —
every row is suppressed and no stderr is emitted. A bad filter
is indistinguishable from "filter matched nothing"; verify the
expression against the FORMATS section of ``tmux(1)``. See
:ref:`native-filtering` for the typed wrappers that share this
caveat. Warning:
- `# noqa: A002`

## Returns

OutputsRaw
    A list of dicts, each mapping tmux format field names to their
    non-empty string values.

## Raises

- `LibTmuxException`: If the tmux command writes to stderr.

## Example

```python
>>> from libtmux.neo import fetch_objs
>>> objs = fetch_objs(server=server, list_cmd="list-sessions")
>>> isinstance(objs, list)
True
>>> isinstance(objs[0], dict)
True
>>> 'session_id' in objs[0]
True
```
