Python version of geo-pt-api!
Detect official divisional administrative regions of Portugal ("Carta Administrativa Oficial de Portugal - CAOP 2020", from here), providing GPS coordinates as input. You can use the public API here.
It creates a HTTP server, whose GET request /?lat=40.153687&lon=-8.514602
returns a JSON
{
"freguesia": "Anobra",
"concelho": "Condeixa-A-Nova",
"distrito":"Coimbra"
}
(optional) $ python -m venv env && source env/bin/activate
- $ pip install -r requirements.txt
- $ uvicorn main:app --port :port: