maybe somebody knows something, since I am not able to find anything that makes sense to me.
I have a dataset positions (lon, lat) and I want to snap them to the nearest road and calculate the distance between them.

So far I discovered OSM, however I can't find a working example on how to use the API using python.

If any of you could help, I am thankful for ever little detail.

Will try to find it out by myself in the meantime and publish the answer if successful (couldn't find any similar question so maybe it will help someone in the future)