def get_user_by_key(app, key):
    """
    This method is only an example! Replace it with a real user database.

    :param str key: the public key the user belongs to
    """
    if not hasattr(app, 'example_user_db'):
        app.example_user_db = {}

    if key in app.example_user_db:
        return app.example_user_db[key]
    return None
This method is only an example! Replace it with a real user database.

    :param str key: the public key the user belongs to