Python API that calculates the travel time from multiple starting points to a destination, considering traffic conditions. This project was developed to capture travel time and distance from SAMU bases to an incident location, and from this data, gain insights for the best route to improve the agility of the emergency health service. The program essentially automates address searches on Google Maps and captures the travel time from one point to another.
- Used for automation: Searching, navigating, and web scraping.
- API used to handle the browser natively.
- Python framework for creating REST APIs.
- A library for static data typing in Python. Used to define the expected input model for the API.
- ASGI server. Used to run the FastAPI app.
pip install requirements.txt
- Mozilla Firefox browser installed
uvicorn main:app
INFO: Uvicorn running on http://127.0.0.1:8000
http://127.0.0.1:8000/docs
{
"bases_do_samu": [
{"id": 1, "coordenadas": [2.7978590095183815, -60.718581462488835]},
{"id": 2, "coordenadas": [2.4419088075792965, -60.91876568947235]},
{"id": 3, "coordenadas": [2.164913408340161, -61.04689836849074]},
{"id": 4, "coordenadas": [2.766412595217544, -60.73516486248878]},
{"id": 5, "coordenadas": [4.348585615593088, -61.141598892426686]},
{"id": 6, "coordenadas": [2.8607589873052603, -60.73611670998919]}
],
"qth": [
"2.824651572924736, -60.67060368260708"
]
}