Changing Qgis layer datasource with pythonhttps://geogear.wordpress.com/2015/05/15/changing-qgis-layer-datasource-with-python/