The SSH host key has changed on 8 April, 2022 to this one: SHA256:573uTBSeh74kvOo0HJXi5ijdzRm8me27suzNEDlGyrQ

Initial non-working version

master
Gergely Polonkai 5 years ago
commit 10e5910a91
  1. 0
      flask_matrix/__init__.py
  2. 25
      flask_matrix/base.py
  3. 2
      requirements.txt

@ -0,0 +1,25 @@
class FlaskMatrix(object):
def __init__(self, app=None):
self.api = None
self.app = None
if app:
self.init_app(app)
def init_app(self, app):
app.config.setdefault('MATRIX_BASE_URL', None)
app.config.setdefault('MATRIX_USERNAME', None)
app.config.setdefault('MATRIX_PASSWORD', None)
app.config.setdefault('MATRIX_TOKEN', None)
if app.config['MATRIX_USERNAME'] is None and app.config['MATRIX_PASSWORD'] is None \
app.config['MATRIX_TOKEN'] is None:
raise ValueError('You must specify at least MATRIX_TOKEN or both MATRIX_USERNAME and MATRIX_PASSWORD')
if app.config['MATRIX_BASE_URL'] is None:
raise ValueError('MATRD]IX_BASE_URL is not set!')
self.username = app.config['MATRIX_USERNAME']
self.password = app.config['MATRIX_PASSWORD']
self.client = MatrixHttpApi(app.config['MATRIX_BASE_URL'], token=app.config['MATRIX_TOKEN'])

@ -0,0 +1,2 @@
Flask==0.12.2
matrix-client==0.0.6
Loading…
Cancel
Save