def close_pymongo_connection(app):
 if ('pymongo' not in app.extensions):
  return
 del app.extensions['pymongo']
 del app.media

def close_pymongo_connection ( app ) : if ( 'pymongo' not in app . extensions ) : return del app . extensions [ 'pymongo' ] del app . media
close the pymongo connection in an eve/flask app .