Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

512
Visualizações
Find Location with Flask WebApp and Google Map

I have about 2000 Location Point (Lat, long) in CSV format and I want make a local Flask app (a Python Micro-framework) to send each of this point to google map API and find the address corresponding and save theme.

At first I install PostgreSQL and pgAdmin and then import CSV file to a new database. Secondly I install Virtualenv and also psycopg2 Flask-SQLAlchemy in my env folder

Now I have to make connection between my database and my flask app, then send each of database records (my location points!) to google map and store corresponding address to another filed in my database. but I don't know how I can connect PostgreSQL to Flask app and then how to send points and store address.

  • Also I think I have to use geopy in this web app, but how I don't know!

(Python 3.5 - PostgreSQL 9.6 - Linux Ubuntu 16.0.4)

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

Um, not enough reputation to comment.

By the way, just use Psycopg2 module sending query to database, and render the the resultSet. You have to design what data you want to render to the specific route in Flask.

Google-Maps API provides different types of data return, which kind you needed?

  • If you want to show the map in Flask pages, you should work on Google-Maps' JavaScript.

  • And If you no need to display the data but only store in database, just send the request to the API entry. Use Request module and no need Flask.

geopy.geocoders.GoogleV3

>> from geopy.geocoders import GoogleV3
>> geolocator = GoogleV3()
>> location = geolocator.geocode("175 5th Avenue NYC")
>> print(location.address)
175 5th Ave, New York, NY 10010, USA
>> location = geolocator.reverse("40.7410861, -73.9896297241625")
>> print(location[0])
Flatiron Building, New York, NY 10010, USA
over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda