# libtmux.Server.source_file

- **Module:** libtmux.Server
- **Package:** libtmux
- **Language:** Python
- **Kind:** method
- **Source:** https://github.com/tmux-python/libtmux/blob/036c521c4b83ce6e434eb50afe2a0d08a6a05e46/src/libtmux/server.py#L2101
- **Page:** https://libtmux.org/reference/py/libtmux-server-source_file/

```
libtmux.Server.source_file(self, path: StrPath, quiet: bool | None = None, parse_only: bool | None = None, verbose: bool | None = None) -> None
```

Source a tmux configuration file via ``$ tmux source-file``.

## Parameters

- `self`
- `path` (StrPath) — Path to the configuration file.
- `quiet` (bool | None) — Suppress errors for missing files (``-q`` flag).
- `parse_only` (bool | None) — Check syntax only, do not execute (``-n`` flag).
- `verbose` (bool | None) — Show parsed commands (``-v`` flag).

## Example

```python
>>> import pathlib
>>> conf = pathlib.Path(request.config.rootdir) / '..' / 'tmp_src.conf'
>>> _ = conf.write_text('set -g @test_source yes')
>>> server.source_file(str(conf))
```
