# libtmux.Session.get_by_id

- **Module:** libtmux
- **Package:** libtmux
- **Language:** Python
- **Kind:** method
- **Source:** https://github.com/tmux-python/libtmux/blob/38e368c11117fb4aeb2f082d552cd4f210eae06a/src/libtmux/session.py#L1115
- **Page:** https://libtmux.org/en/py/stable/reference/libtmux-session-get_by_id/

```
libtmux.Session.get_by_id(
    self, session_id: str
) -> Window | None
```

Return window by id. Deprecated in favor of :meth:`.windows.get()`.

## Deprecated

0.16 — Deprecated by :meth:`.windows.get()`.

## Parameters

- `session_id` (`str`)
