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

303
Visualizações
Python in Google Cloud Functions

Can Google Cloud Functions handle python with packages like sklearn, pandas, etc? If so, can someone point me in the direction of resources on how to do so.

I've been searching a while and it seems like this is impossible, all I've found are resources to deploy the base python language to google cloud.

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

0

Python 3.7 is supported now.
Steps to create one via the google cloud console:

  1. go to google cloud functions in the google cloud console and click on create function enter image description here

2.specify the function's properties enter image description here

  1. select trigger enter image description here

4.change runtime to python 3.7 enter image description here

  1. enter your cloud function logic and entry point enter image description here

  2. enter python dependencies in requirements.txt enter image description here

over 4 years ago · Santiago Trujillo Relatório

0

EDIT: As of July 2018 there is now a Python runtime (3.7) available for Google Cloud Functions!

OLD ANSWER: Google Cloud Functions (GCF) are written in JavaScript (executed in a Node.js runtime), so there is no way for them to actually handle Python at this moment. There is a Python module at GitHub that you might have come across and it can be used to write and deploy GCF with one of three trigger types: http, Pub/Sub and bucket. The module takes care of translating your Python logic to a JavaScript code that is later run inside Google Cloud Platform.

When it comes to other packages like pandas, the ‘translation’ into JavaScript was not prepared for them by anyone AFAIK. If you really don’t like the idea of jumping into JavaScript and writing the Cloud Function code on your own (with the logic you intended to use in a Python script), you have a possible workaround. You can evoke your Python script from inside of the Cloud Function written in JS - the idea was discussed in this topic. Another way is using Object Change Notifications or Pub/Sub Notifications as explained here.

over 4 years ago · Santiago Trujillo Relatório

0

As of 19th July 2018, Google Cloud Functions supports Python 3.7.

Kindly check the Runtime environment to find the Python 3.7 runtime and sample script (based on Flask) .

--UPDATED--

Official Documentation for the Google Cloud Functions - Python 3.7 support Beta Release.

This is a beta release of the Python runtime for Google Cloud Functions. This feature might be changed in backward-incompatible ways and is not subject to any SLA or deprecation policy.

SkLearn, Numpy is supported in Google Cloud function. Also I've run a sample test to confirm the availability of Pandas as well and its working fine.

https://github.com/mkanchwala/google-functions-python-example

Hope this helps to all the "Py" lovers.

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