Beispiel #1
0
def add_mongo_config_with_uri(app, connection_string_uri, database_name,
                              collection_name):
    """
    Configure PyMongo with a MongoDB connection string.

    :param app: Flask application
    :param connection_string_uri: MongoDB connection string
    :param database_name: Sacred database name
    :param collection_name: Sacred's collection with runs
    :return:
    """
    app.config["data"] = PyMongoDataAccess.build_data_access_with_uri(
        connection_string_uri, database_name, collection_name)
Beispiel #2
0
def add_mongo_config_with_uri(app, connection_string_uri, database_name,
                              collection_name):
    app.config["data"] = PyMongoDataAccess.build_data_access_with_uri(
        connection_string_uri, database_name, collection_name)