mautrix.appservice

class mautrix.appservice.AppService

Bases: mautrix.appservice.AppServiceServerMixin

The main AppService container.

__init__(server, domain, as_token, hs_token, bot_localpart, id, loop=None, log=None, verify_ssl=True, tls_cert=None, tls_key=None, query_user=None, query_alias=None, real_user_content_key='net.maunium.appservice.puppet', state_store=None, aiohttp_params=None, ephemeral_events=False, default_ua='mautrix-python/0.12.4 aiohttp/3.8.1 Python/3.10.0', default_http_retry_count=0, connection_limit=None)
Parameters
  • server (str) –

  • domain (str) –

  • as_token (str) –

  • hs_token (str) –

  • bot_localpart (str) –

  • id (str) –

  • loop (Optional[asyncio.events.AbstractEventLoop]) –

  • log (Optional[Union[logging.Logger, str]]) –

  • verify_ssl (bool) –

  • tls_cert (Optional[str]) –

  • tls_key (Optional[str]) –

  • query_user (Optional[Callable[[aiohttp.web_request.Request], Awaitable[Optional[aiohttp.web_response.Response]]]]) –

  • query_alias (Optional[Callable[[aiohttp.web_request.Request], Awaitable[Optional[aiohttp.web_response.Response]]]]) –

  • real_user_content_key (Optional[str]) –

  • state_store (Optional[mautrix.appservice.ASStateStore]) –

  • aiohttp_params (Optional[Dict]) –

  • ephemeral_events (bool) –

  • default_ua (str) –

  • default_http_retry_count (int) –

  • connection_limit (Optional[int]) –

Return type

None

property http_session: aiohttp.ClientSession
property intent: mautrix.appservice.IntentAPI
async start(host='127.0.0.1', port=8080)
Parameters
  • host (str) –

  • port (int) –

Return type

None

async stop()
Return type

None

server: str
domain: str
id: str
verify_ssl: bool
tls_cert: str
tls_key: str
as_token: str
hs_token: str
bot_mxid: mautrix.types.UserID
default_ua: str
default_http_retry_count: int
real_user_content_key: str
state_store: mautrix.appservice.ASStateStore
transactions: Set[str]
query_user: Callable[[mautrix.types.UserID], mautrix.types.JSON]
query_alias: Callable[[mautrix.types.RoomAlias], mautrix.types.JSON]
ready: bool
live: bool
loop: asyncio.events.AbstractEventLoop
log: mautrix.util.logging.TraceLogger
app: aiohttp.web_app.Application
runner: aiohttp.web_runner.AppRunner