# libtmux.Server.get_by_id

- **Module:** libtmux.Server
- **Package:** libtmux
- **Language:** Python
- **Kind:** method
- **Source:** https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/server.py#L2752
- **Page:** https://libtmux.org/en/py/latest/reference/libtmux-server-get_by_id/

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

Return session by id. Deprecated in favor of :meth:`.sessions.get()`.
