pymap.backend.dict
¶
- class pymap.backend.dict.DictBackend(login, config)[source]¶
Defines a backend that uses an in-memory dictionary for example usage and integration testing.
- Parameters:
login (Login)
config (Config)
- property login: Login¶
Login interface that handles authentication credentials.
- property status: HealthStatus¶
The health status for the backend.
- classmethod add_subparser(name, subparsers)[source]¶
Add a command-line argument sub-parser that will be used to choose this backend. For example:
parser = subparsers.add_parser('foo', help='foo backend') parser.add_argument(...)
- Parameters:
name (str) – The name to use for the subparser.
subparsers (Any) – The special action object as returned by
add_subparsers()
.
- Returns:
The new sub-parser object.
- Return type:
- async classmethod init(args, **overrides)[source]¶
Initialize the backend and return an instance.
- Parameters:
- Return type:
- async start(stack)[source]¶
Start the backend.
- Parameters:
stack (AsyncExitStack) – An exit stack that should be used for cleanup.
- Return type:
None
- class pymap.backend.dict.Config(args, *, demo_data, demo_user, demo_password, demo_data_resource='pymap.backend.dict', admin_key=None, **extra)[source]¶
The config implementation for the dict backend.
- Parameters:
- property backend_capability: BackendCapability¶
Allows backends to declare support for IMAP extensions and other capabilities.