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:
- If you are operating on a unix-based operating system, you can create a file
mortimer.confin/etc. - You can create a file
mortimer.confin your user home directory. - You can create a file
mortimer.confin a directory of your choosing and set the directory path (not the full path to the file) as an environment variable with the keyMORTIMER_CONFIG. - You can create a file
mortimer.confin 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:
userAdminrole on the "alfred" database.readWriterole on the "mortimer" dabatase.readrole 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.
Metadata
Release files for mortimer 0.10.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mortimer-0.10.0.tar.gz | 1.0 MB | Without provenance | Details for mortimer-0.10.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mortimer-0.10.0-py3-none-any.whl | Python 3 | none | any | Details for mortimer-0.10.0-py3-none-any.whl |
Total release size: 2.0 MB
Release files / mortimer-0.10.0.tar.gz
| Download URL | mortimer-0.10.0.tar.gz |
|---|---|
| Size | 1.0 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6bae423e594d6b8e118c45eff5b9629f34406d2e36300e21f9cccdfc751f7527
|
|
BLAKE2b-256 checksum How to use checksums |
7043f3d96cfb9a11c5253cc553fc79a5a64d231c492fabb5d5406f494a9c8cb4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / mortimer-0.10.0-py3-none-any.whl
| Download URL | mortimer-0.10.0-py3-none-any.whl |
|---|---|
| Size | 1.0 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
dd441127e9291eb4234bc27b7b443eac5481dc61e665fcb35359d5e1a24e6b4d
|
|
BLAKE2b-256 checksum How to use checksums |
6c6492801b02c86b88795cd637e3de96ec4516947916eb190830e53fb72cbe45
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Security for mortimer 0.10.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.