python code for osm