class documentation

class AsyncClient: (source)

View In Hierarchy

Provide an Idiomatic API for Mailman Core.

It requires an HTTP client instance as the first argument. You can use any client which has a .request() method and accepts named parameters url, path, auth, method and data. data is supposed to be a dictionary of parameters to be passed to the HTTP request and the rest are string parameters with their usual meaning.

The parameters are based off on httpx python library.

Parameters
clientHttp client object with an async request method.
base_urlBase URL to Core's API.
userCore admin username.
passwordCore admin password.
Method __init__ Undocumented
Async Method addresses All the addresses in Mailman
Async Method domains Get all domains.
Async Method find_members Find members.
Async Method lists Get a list of MailingLists
Async Method members All the Members
Async Method system Get the Mailman system information.
Async Method users All the users in Mailman Core
Instance Variable client Undocumented
Instance Variable connection Undocumented
def __init__(self, client, base_url, user, password): (source)

Undocumented

Parameters
client:HTTPClientProtoUndocumented
base_url:strUndocumented
user:strUndocumented
password:strUndocumented
async def addresses(self): (source)

All the addresses in Mailman

/<api>/address

Returns
List[Address]Undocumented
async def domains(self): (source)

Get all domains.

/<api>/domains

Returns
List[Domain]Undocumented
async def find_members(self, list_id=None, subscriber=None, role=None, moderation_action=None, delivery_status=None, delivery_mode=None): (source)

Find members.

/<api>/members/find

Parameters
list_id:strMailinglist id.
subscriber:strEmail or user_id or partial search string.
role:strMembership role. One of 'owner', 'member', 'nonmember' or 'moderator'.
moderation_action:strOne of the moderation action from 'defer', 'accept', 'discard', 'reject', 'hold'.
delivery_status:strDelivery status of the Member. It can be one among 'enabled', 'by_user', 'by_moderator' or 'by_bounces'.
delivery_mode:strDelivery mode of the member. It can be one between 'plaintext_digests', 'mime_digests', 'regular'.
Returns
List[Member]Undocumented
async def lists(self): (source)

Get a list of MailingLists

/<api>/lists

Returns
List[MailingList]Undocumented
async def members(self): (source)

All the Members

/<api>/members

Returns
List[Member]Undocumented
async def system(self): (source)

Get the Mailman system information.

/<api>/system

Returns
Mapping[str, Any]Undocumented
async def users(self): (source)

All the users in Mailman Core

/<api>/users

Returns
List[User]Undocumented

Undocumented

connection = (source)

Undocumented