Create a graph from an online map and import it in Python

Hello everyone. I need urgent help. I want to implement A* algorithm with my own data. I want to create a graph of my home town/area and run A* on it. How is this possible?