1

Before venturing into Azure function I wanted to ask. I have python class which calls 4 others class and do some data extraction.

Is it possible to execute this class and thereby the other 4 classes through Azure function?

I am aware that a single python code can be executed but is it possible to execute a collection of files?

Jay Gong
  • 23,163
  • 2
  • 27
  • 32
Gagan
  • 1,775
  • 5
  • 31
  • 59
  • if you push your 4 classes to the execution directory, it will be fine – Thomas Aug 26 '18 at 06:25
  • So I will be executing the function through ADFv2 through the HTTP trigger. Now can I put multiple run.py in the function and get different function URL for each one of them so that I can be able to execute it one by one through ADFv2? – Gagan Aug 27 '18 at 06:40
  • You can have as many functions in your function app as you need – Thomas Aug 27 '18 at 06:50
  • Yes but for each function do I need to install my python libraries again? Thats the issue because it takes a lot of time to install. – Gagan Aug 27 '18 at 07:38
  • you mean using pip install ??? if so, it will be shared accross your differents functions. Otherwise you can have shared code in your function app – Thomas Aug 27 '18 at 07:53
  • If its shared across my other functions then its awesome. Thats what I needed. – Gagan Aug 27 '18 at 08:24
  • Can you provide the answer of the question in a seperate comment so that I accept it for the benefit of others? – Gagan Aug 27 '18 at 08:24
  • Just one last question if you dont mind. I have Azure function in my free trial account. Can I migrate it to my company's account (Pay as per go) where my production Azure portal is? – Gagan Aug 27 '18 at 08:26
  • i dont think so. Just commit your existing code to a git repo then you can easily recreate a new function app with the same code. – Thomas Aug 27 '18 at 09:02
  • my only worry is to reinstall python modules. Will it be a part of that commit? – Gagan Aug 27 '18 at 09:15
  • Nope you will have to reinstall the modules and extensions. you can script this part: https://stackoverflow.com/a/47213859/4167200 – Thomas Aug 27 '18 at 09:20
  • Thanks Thomas. Can you please post the solution of the question as a seperate post and I will mark it as the answer? – Gagan Aug 27 '18 at 10:44

1 Answers1

0

Apparently it is possible to execute a bunch of python files but the main constraint is that the total execution time should be less then 10min.

Gagan
  • 1,775
  • 5
  • 31
  • 59