Skip to content


We use Flask as our web framework. It handles user authentication, dataset upload, task creation, and other aspects that require server-side interaction. It is designed to be independent from the OpenML API. This means that you can use it to create your own personal frontend for OpenML, using the main OpenML server to provide the data. Of course, you can also link it to your own local OpenML setup.


Out flask app follows Application factories design pattern. A new app instance can be created by:

    from autoapp import create_app
    app = create_app(config_object)

The backend is designed in a modular fashion with flask Blueprints. Currently, the flask app consists of two blueprints public and user:

  • Public blueprint: contains routes that do not require user authentication or authorization. like signup and forgot password.
  • User blueprint: Contains routes which require user authentication like login, changes in profile and fetching API key.

New blueprints can be registered in `server/` with register_blueprints function:

    def register_blueprints(app):

Database setup

If you want o setup a local user database similar to OpenML then follow these steps:

  1. Install MySQL
  2. Create a new database 'openml'
  3. Set current database to 'openml' via use method
  4. Download users.sql file from github repo and add it in the openml db via "mysql -u root -p openml < users.sql"
  5. Edit the database path in `server/` and `server/`

Note: Remember to add passwords and socket extension address(if any) in both in server/ and server/


Flask backend uses JSON web tokens for all the user handling tasks. Flask JWT extended library is used to bind JWT with the flask app. Current Mechanism is :

  1. User logs in.
  2. JWT token is assigned to user and sent with every request to frontend.
  3. All the user information can only be accessed with a JWT token like edit profile and API-key.
  4. The JWT token is stored in local memory of the browser.
  5. The token get expired after 2 hours or get blacklisted after logout.

JWT is registered as an extension in `server/`. All the user password hash are saved in Argon2 format with the new backend.

Registering Extensions

To register a new extension to flask backend extension has to be added in server/ and initialized in server/ Current extensions are : flask_argon2, flask_bcrypt, flask_jwt_extended and flask_sqlalchemy.

Configuring App

Configuration variables like secret keys, Database URI and extension configurations are specified in server/ with Config object, which is supplied to the flask app during initialization.

Creating a new route

To create a new route in backend you can add the route in server/public/ or server/user/ (if it requires user authorisation or JWT usage in any way).

Bindings to OpenML server

You can specify which OpenML server to connect to. This is stored in the .env file in the main directory. It is set to the main OpenML server by default:


The ElasticSearch server is used to download information about datasets, tasks, flows and runs, as well as to power the frontend search. The OpenML server is used for uploading datasets, tasks, and anything else that requires calls to the OpenML API.

Bindings to frontend

The frontend is generated by React. See below for more information. The React app is loaded as a static website. This is done in Flask setup in file

    app = Flask(__name__, static_url_path='', static_folder='src/client/app/build')

It will find the React app there and load it.

Email Server

OpenML uses its own mail server, You can use basically any mail server compatible with python SMTP library. Our suggestion is to use for local testing. You can configure email server configurations in .env file. Currently we only use emails for confirmation email and forgotten password emails.