getting street distances

I need a few thousands of street distances between cities in germany.
I know that there are a few web APIs where I get the distance thru a REST request, but I wonder if I can do that locally on my Linux PC. I saw the OSRM project and libosrm seems to do what I want.
Are there any other tools doing that?
What do I have to download and what do I have to install?
(I prefer to program in python)

So I assume that you know https://wiki.openstreetmap.org/wiki/Routing as most quoted information source about routing?

Maybe you can try to install an own instance of graphopper? see https://www.graphhopper.com