class documentation

class InMemoryWordsRealm(WordsRealm): (source)

View In Hierarchy

Undocumented

Method __init__ Undocumented
Instance Variable users Undocumented
Instance Variable groups Undocumented
Method itergroups Return all groups available on this service.
Method addUser Add the given user to this service.
Method addGroup Add the given group to this service.
Method lookupUser Undocumented
Method lookupGroup Retrieve a group by name.

Inherited from WordsRealm:

Instance Variable name A short string identifying this chat service (eg, a hostname)
Method userFactory Undocumented
Method groupFactory Undocumented
Method logoutFactory Undocumented
Method requestAvatar Return avatar which provides one of the given interfaces.
Class Variable createGroupOnRequest A boolean indicating whether getGroup should implicitly create groups which are requested but which do not yet exist.
Class Variable createUserOnRequest A boolean indicating whether getUser should implicitly create users which are requested but which do not yet exist.
Method getGroup Retrieve the group by the given name.
Method getUser Retrieve the user by the given name.
Method createUser Create a new user with the given name.
Method createGroup Create a new group with the given name.
Class Variable _encoding Undocumented
def __init__(self, *a, **kw): (source)
users = (source)

Undocumented

(type: dict)
groups = (source)

Undocumented

(type: dict)
def itergroups(self): (source)

Return all groups available on this service.

ReturnsA Deferred which fires with a list of IGroup providers. (type: twisted.internet.defer.Deferred)
def addUser(self, user): (source)

Add the given user to this service.

This is an internal method intended to be overridden by WordsRealm subclasses, not called by external code.

ParametersuserUndocumented (type: IUser)
ReturnsA Deferred which fires with None when the user is added, or which fails with twisted.words.ewords.DuplicateUser if a user with the same name exists already. (type: twisted.internet.defer.Deferred)
def addGroup(self, group): (source)

Add the given group to this service.

ParametersgroupUndocumented (type: IGroup)
ReturnsA Deferred which fires with None when the group is added, or which fails with twisted.words.ewords.DuplicateGroup if a group with the same name exists already. (type: twisted.internet.defer.Deferred)
def lookupUser(self, name): (source)
def lookupGroup(self, name): (source)

Retrieve a group by name.

Unlike getGroup, this will never implicitly create a group.

ParametersnameUndocumented (type: str)
ReturnsA Deferred which fires with the group by the given name, or which fails with twisted.words.ewords.NoSuchGroup. (type: twisted.internet.defer.Deferred)
API Documentation for Twisted, generated by pydoctor 21.2.0 at 2021-02-28 21:00:42.