ungleich-tools/matrix/matrix-client.py

16 lines
352 B
Python
Raw Normal View History

#!/usr/bin/env python3
import sys
import urllib
from mautrix.client import ClientAPI
matrix_server="ungleich.matrix.ungleich.cloud"
matrix_user="@nico:ungleich.ch"
matrix_password=sys.argv[1]
client = ClientAPI(matrixuser,
base_url=f"https://{matrix_server}"
token="syt_123_456")
await print(client.whoami())