module documentation
(source)

Async client for Mailman Core 3.1 API.

AsyncClient provides a thin Python API over Mailman Core's HTTP API. It is currently is very early stages and supports on read operations. Some of the read operations might be missinng as well.

To start using the client, you need an async http library. httpx is officially supported one, but making some other client work with it is pretty easy.

>>> import httpx
>>> conn = httpx.AsyncClient()
>>> from mailmanclient.asynclient import AsyncClient
>>> client = AsyncClient(conn, 'http://localhost:8001/3.1',
...                      'restadmin', 'restpass')

You will need an event loop to actually run the client. You can reuse your existing one by calling await on the client methods, or you can create a new one using the standard library asyncio module.

>>> import asyncio
>>> domains = asyncio.run(client.domains())
Class ​Async​Client Provide an Idiomatic API for Mailman Core.
Constant JSON​_CONTENT​_TYPE Undocumented
JSON_CONTENT_TYPE: str = (source)

Undocumented

Value
'application/json'