class documentation

A standard Connection object.

This is an abstraction over HTTP connections for Mailmanclient. It can be initialized with any http client library with and async request method. The paramters are currently tailored for httpx, but if there are folks interested in others, it is easy to provide a wrapper which accept such parameters.

Parameters
clientThe http client object with request method.
Method __init__ Initialize a connection to the REST API.
Async Method call Make a call to the Mailman REST API.
Instance Variable client Undocumented

Inherited from Connection:

Method add_hooks Add a list of hooks to an existing connection object.
Method rewrite_url rewrite url component with self.baseurl prefix "scheme://netloc"
Instance Variable auth Undocumented
Instance Variable baseurl Undocumented
Instance Variable name Undocumented
Instance Variable password Undocumented
Instance Variable request_hooks Undocumented
Method _prepare_request Undocumented
Method _process_request_hooks Given the request parameters, pass them through the list of hooks.
def __init__(self, client, *args, **kw): (source)

Initialize a connection to the REST API.

Parameters
clientUndocumented
*argsUndocumented
**kwUndocumented
baseurlThe base url to access the Mailman 3 REST API.
nameThe Basic Auth user name. If given, the password must also be given.
passwordThe Basic Auth password. If given the name must also be given.
request_hooksA list of callables that can receive the request parameters and return them with some changes or unchanged.
async def call(self, path, data=None, method=None): (source)

Make a call to the Mailman REST API.

Parameters
path:strThe url path to the resource.
data:dictData to send, implies POST (default) or PUT.
method:strThe HTTP method to call. Defaults to GET when data is None or POST if data is given.
Returns
None, list, dictThe response content, which will be None, a dictionary, or a list depending on the actual JSON type returned.
Raises
HTTPErrorwhen a non-2xx status code is returned.

Undocumented