Core LibrarystableAPI Reference

Choose documentation 3

stable

Current version

stable
English

Prerelease This site documents an alpha of libtmux. Its structure, URLs and APIs are subject to change.

Python API

method libtmux stable

Server.server_access

Manage server access control via $ tmux server-access.

Source and package
Qualified name
libtmux.Server.server_access
Module
libtmux
Declared in
Server
Package
libtmux
Source
src/libtmux/server.py
server_access ( self, allow: str | None = None, deny: str | None = None, list_access: bool | None = None, read_only: bool | None = None, write: bool | None = None, ) → list[str] | None

Description#

Requires tmux 3.3+ (introduced in 3.3).

Examples#

>>> from libtmux.common import has_gte_version
>>> if has_gte_version("3.3"):
... result = server.server_access(list_access=True)
... assert isinstance(result, list)
Parameters
  • allow (str | None) # – Allow a user (-a flag).

  • deny (str | None) # – Deny a user (-d flag).

  • list_access (bool | None) # – List access rules (-l flag).

  • read_only (bool | None) # – Force the user to attach read-only (-r flag). Implies allow if the user is not already in the ACL. Mutually exclusive with write — tmux rejects -r -w.

  • write (bool | None) # – Allow the user to attach read-write (-w flag). Implies allow if the user is not already in the ACL. Mutually exclusive with read_only.

Returns

list[str] | None Access list when list_access is True, None otherwise.

Esc

Type to search.

Reference preview Open reference