class documentation

class UserDB(Protocol): (source)

View In Hierarchy

A database of users by name, like the stdlib pwd module.

See twisted.python.fakepwd for an in-memory implementation.

Method getpwnam Lookup a user record by name.
def getpwnam(self, username: str) -> UserRecord: (source)

Lookup a user record by name.

Raises
KeyErrorwhen no such user exists