Skip to main content

A web-appication for the administration of alfred experiments.

Project description

Welcome to Mortimer

Mortimer is a free, open source web application written in the Flask Framework. It's purpose is to host and manage Alfred experiments and surveys.

IMPORTANT NOTE: Mortimer is currently not easy to set up and use safely. Please contanct us, if you want to use it. Most importantly, you should allow only trusted users to register.

Installation

Prerequisites

  • Python 3.7 or newer installed
  • A MongoDB instance with authentication enabled.
    • For MongoDB installation on Debian servers, you can refer to the official installation guide.
    • Create a databse "mortimer" and a database "alfred" in your MongoDB instance. The "mortimer" db will be used for user management and deployment of Alfred experiments. The "alfred" database will be used by Alfred to store experimental data.
  • Refer to the MongoDB security checklist to ensure adequate security of your database.

Installation

IMPORTANT NOTE: Mortimer is currently not easy to set up and use safely. Please contanct us, if you want to use it. Most importantly, you should only ever allow trusted users to register.

pip install mortimer

Configure Mortimer

Now you need to configure mortimer. You have the following options on where to place it:

  1. If you are operating on a unix-based operating system, you can create a file mortimer.conf in /etc.
  2. You can create a file mortimer.conf in your user home directory.
  3. You can create a file mortimer.conf in a directory of your choosing and set the directory path (not the full path to the file) as an environment variable with the key MORTIMER_CONFIG.
  4. You can create a file mortimer.conf in your instance path.

You only need to use one of these options. If you don't know which one to use, we recommend to place the configuration fiel in your instance directory. The files are read in that order, later files override earlier ones.

For a minimal setup, you need to specify the following settings.

Notes:

  • The mongoDB user needs to have the following roles:
    • userAdmin role on the "alfred" database.
    • readWrite role on the "mortimer" dabatase.
    • read role on the "alfred" database.
# General flask settings
SECRET_KEY =            # Must be URL-safe base64-encoded 32-byte key for fernet encryption in STR (NOT in bytes)
PAROLE =                # a passphrase that new users need to enter upon registration
DEBUG =                 # True or False

# flask-mongoengine settings
MONGODB_SETTINGS = {
    "host": "localhost",
    "port": 27017,
    "username": "<username>",
    "password": "<password>"
}

Start

Before starting, you need to create a run.py and specify your instance path. The run.py will look like this:

from mortimer import create_app

path = "" # fill in your instance path here!

app = create_app(instance_path=path)

if __name__ == "__main__":
    app.run(debug=True)

You are now ready to start Mortimer. In a shell, execute the following command (make sure that you are inside the mortimer directory):

export FLASK_APP=run.py
flask run

This will allow you to access Mortimer locally via 127.0.0.1/5000 from your webbrowser. You can make the app available externally with these commands:

export FLASK_APP=run.py
flask run --host=0.0.0.0 --port=5000

Important Note: Do not use this in a production setting. It is not intended to meet security and performance requirements for a production server. Instead, see Flasks Deployment Options for WSGI server recommendations.

IMPORTANT NOTE: Mortimer is currently not easy to set up and use safely. Please contanct us, if you want to use it. Most importantly, you should allow only trusted users to register.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mortimer-0.5.1.tar.gz (99.3 kB view details)

Uploaded Source

Built Distribution

mortimer-0.5.1-py3-none-any.whl (123.8 kB view details)

Uploaded Python 3

File details

Details for the file mortimer-0.5.1.tar.gz.

File metadata

  • Download URL: mortimer-0.5.1.tar.gz
  • Upload date:
  • Size: 99.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/46.2.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.4

File hashes

Hashes for mortimer-0.5.1.tar.gz
Algorithm Hash digest
SHA256 2642724dad26e163e01dd0fefe8ca434e6c5ae8b4f5aa65e6d91d108b07b0f3c
MD5 6bea5e4aac9f3bf1aed626cea591b976
BLAKE2b-256 61f6c9e55948d416840ffd524d0ca5f4d1a265dd52e3eb5d4c8896ece9f11604

See more details on using hashes here.

File details

Details for the file mortimer-0.5.1-py3-none-any.whl.

File metadata

  • Download URL: mortimer-0.5.1-py3-none-any.whl
  • Upload date:
  • Size: 123.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/46.2.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.4

File hashes

Hashes for mortimer-0.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c79d4d1c5acbde500f9aefc0d3b358e8d0100a15f691800cbd4e82735f38b54e
MD5 f6a9b50fbb770fbea93c5ae5f3b6c2f6
BLAKE2b-256 10e44a7b9f8616c454dc60df37dd9564dc30804ce99f2714b384a74f28380b60

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page