Go to the latest version of this document.
search in docstrings

Search bar offers the following options:

- Term presence. The below example searches for documents that must contain “foo”, might contain “bar” and must not contain “baz”: `+foo bar -baz`
- Wildcards. The below example searches for documents with words beginning with “foo”: `foo*`
- Search in specific fields. The following search matches all objects in "twisted.mail" that matches “search”: `+qname:twisted.mail.* +search`

  Possible fields: 'name', 'qname' (fully qualified name), 'docstring', and 'kind'. Last two fields are only applicable if "search in docstrings" is enabled.

- Fuzzy matches. The following search matches all documents that have a word within 1 edit distance of “foo”: `foo~1`

Results provided by Lunr.js

# ``twisted`.`python`.`fakepwd`.`ShadowDatabase``

class documentation

`class ShadowDatabase: (source)`

View In Hierarchy

`ShadowDatabase` holds a shadow user database in memory and makes it available via the same API as `spwd`.

Present Since
12.0

Method | `__init__` | Undocumented
Method | `addUser` | Add a new user record to this database.
Method | `getspall` | Return a list of all shadow user records.
Method | `getspnam` | Return the shadow user record corresponding to the given username.
Instance Variable | `_users` | A `list` of `_ShadowRecord` instances holding all user data added to this database.

def __init__(self): (source)

Undocumented

def addUser(self, username, password, lastChange, min, max, warn, inact, expire, flag): (source)

Add a new user record to this database.

Parameters
username:`str` | The value for the `sp_nam` field of the user record to add.
password:`str` | The value for the `sp_pwd` field of the user record to add.
lastChange:`int` | The value for the `sp_lstchg` field of the user record to add.
min:`int` | The value for the `sp_min` field of the user record to add.
max:`int` | The value for the `sp_max` field of the user record to add.
warn:`int` | The value for the `sp_warn` field of the user record to add.
inact:`int` | The value for the `sp_inact` field of the user record to add.
expire:`int` | The value for the `sp_expire` field of the user record to add.
flag:`int` | The value for the `sp_flag` field of the user record to add.

def getspall(self): (source)

Return a list of all shadow user records.

def getspnam(self, username): (source)

Return the shadow user record corresponding to the given username.

Parameters
username:`str` | Undocumented
Returns
`_ShadowRecord` | Undocumented

_users: `list` = (source)

A `list` of `_ShadowRecord` instances holding all user data added to this database.