What is a good way to call a python script from a Google Sheets spreadsheet?What is the quickest way to HTTP GET in Python?What is a clean, pythonic way to have multiple constructors in Python?How do I check what version of Python is running my script?Should I put #! (shebang) in Python scripts, and what form should it take?Is this possible - Python script to fill a Google spreadsheet?Trigger python code from Google spreadsheets?Python: Write pandas dataframe to google sheets: AttributeError: 'module' object has no attribute 'open'Google Sheets query in PythonPython Google Sheets API Limit 429 Error with LoopPython - Google Sheets API - Not Writing to the Specified Range

Tiny image scraper for xkcd.com

Is it safe for a student to give negative feedback in student evaluations?

One hour 10 min layover in Newark; International -> Domestic connection. Enough time to clear customs?

How could reincarnation magic be limited to prevent overuse?

To which country did MiGs in Top Gun belong?

Sum of Infinite series with a Geometric series in multiply

Is mathematics truth?

Why would a Intel 8080 chip be destroyed if +12 V is connected before -5 V?

'Hard work never hurt anyone' Why not 'hurts'?

How does Harry wear the invisibility cloak?

How to get all months in a query where one month has no matches?

properties that real numbers hold but complex numbers does not

Why is k-means used for non normally distributed data?

Do artifacts count as creatures when they are put into a graveyard while March of the Machines is in play?

Why didn't Thatcher give Hong Kong to Taiwan?

Importance of electrolytic capacitor size

Heuristic argument for the Riemann Hypothesis

How to add some symbol (or just add newline) if the numbers in the text are not continuous

Why do we need explainable AI?

How do we know if a dialogue sounds unnatural without asking for feedback?

How can I design a magically-induced coma?

What is the most likely cause of short, quick, and useless reviews?

Initializing a std::array with a constant value

In chocolate terminology, what is the name of thinly sliced leaf-shaped toppings made from hot, smooth chocolate, used to form flower petals?



What is a good way to call a python script from a Google Sheets spreadsheet?


What is the quickest way to HTTP GET in Python?What is a clean, pythonic way to have multiple constructors in Python?How do I check what version of Python is running my script?Should I put #! (shebang) in Python scripts, and what form should it take?Is this possible - Python script to fill a Google spreadsheet?Trigger python code from Google spreadsheets?Python: Write pandas dataframe to google sheets: AttributeError: 'module' object has no attribute 'open'Google Sheets query in PythonPython Google Sheets API Limit 429 Error with LoopPython - Google Sheets API - Not Writing to the Specified Range






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








2















I have a google spreadsheet that functions as a quote calculator. I am using python-requests and beautifulsoup to:



  1. Grab values from the google sheet,

  2. login to a supplier's website

  3. Access their online quote calculator

  4. Populate the supplier's online quote form.

  5. Submit the form

  6. Scrape their quote data from the resulting html code.

  7. Populate the google sheet with their cost information

I don't need help with the python code or getting the python code to modify the googlesheet.



what I can't find seemingly anywhere is a good process for calling the python code from within the google sheet.



Ideally, I'd like to have an object in the google sheet (button? link?) that will trigger the web-scraping functionality. I have seen Google Sheets scripts that claim to populate a spreadsheet with scraped data from outside webpages, but these tools don't handle any site with authentication, hence the python angle.



Any suggestions much appreciated.



Everything I've found online explains how to get a process running on GAE to call a Google App script. Nothing about going the other way around.










share|improve this question






























    2















    I have a google spreadsheet that functions as a quote calculator. I am using python-requests and beautifulsoup to:



    1. Grab values from the google sheet,

    2. login to a supplier's website

    3. Access their online quote calculator

    4. Populate the supplier's online quote form.

    5. Submit the form

    6. Scrape their quote data from the resulting html code.

    7. Populate the google sheet with their cost information

    I don't need help with the python code or getting the python code to modify the googlesheet.



    what I can't find seemingly anywhere is a good process for calling the python code from within the google sheet.



    Ideally, I'd like to have an object in the google sheet (button? link?) that will trigger the web-scraping functionality. I have seen Google Sheets scripts that claim to populate a spreadsheet with scraped data from outside webpages, but these tools don't handle any site with authentication, hence the python angle.



    Any suggestions much appreciated.



    Everything I've found online explains how to get a process running on GAE to call a Google App script. Nothing about going the other way around.










    share|improve this question


























      2












      2








      2


      0






      I have a google spreadsheet that functions as a quote calculator. I am using python-requests and beautifulsoup to:



      1. Grab values from the google sheet,

      2. login to a supplier's website

      3. Access their online quote calculator

      4. Populate the supplier's online quote form.

      5. Submit the form

      6. Scrape their quote data from the resulting html code.

      7. Populate the google sheet with their cost information

      I don't need help with the python code or getting the python code to modify the googlesheet.



      what I can't find seemingly anywhere is a good process for calling the python code from within the google sheet.



      Ideally, I'd like to have an object in the google sheet (button? link?) that will trigger the web-scraping functionality. I have seen Google Sheets scripts that claim to populate a spreadsheet with scraped data from outside webpages, but these tools don't handle any site with authentication, hence the python angle.



      Any suggestions much appreciated.



      Everything I've found online explains how to get a process running on GAE to call a Google App script. Nothing about going the other way around.










      share|improve this question














      I have a google spreadsheet that functions as a quote calculator. I am using python-requests and beautifulsoup to:



      1. Grab values from the google sheet,

      2. login to a supplier's website

      3. Access their online quote calculator

      4. Populate the supplier's online quote form.

      5. Submit the form

      6. Scrape their quote data from the resulting html code.

      7. Populate the google sheet with their cost information

      I don't need help with the python code or getting the python code to modify the googlesheet.



      what I can't find seemingly anywhere is a good process for calling the python code from within the google sheet.



      Ideally, I'd like to have an object in the google sheet (button? link?) that will trigger the web-scraping functionality. I have seen Google Sheets scripts that claim to populate a spreadsheet with scraped data from outside webpages, but these tools don't handle any site with authentication, hence the python angle.



      Any suggestions much appreciated.



      Everything I've found online explains how to get a process running on GAE to call a Google App script. Nothing about going the other way around.







      python google-app-engine python-requests google-sheets-api






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 28 at 2:04









      rabbitholefinderrabbitholefinder

      521 silver badge8 bronze badges




      521 silver badge8 bronze badges

























          1 Answer
          1






          active

          oldest

          votes


















          2















          Google Apps Script. You will need to use Apps Script to add a button or menu item to the sheet and then trigger your python script. You will have to make your python code accessible through some web api and call that api via Apps Script using the UrlFetch service.






          share|improve this answer

























          • We ended up using google app script triggers. In the past, authentication to external web sites was not possible. Now, it is and we abandoned using python's web scraping libraries altogether.

            – rabbitholefinder
            Apr 9 at 14:40










          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55389127%2fwhat-is-a-good-way-to-call-a-python-script-from-a-google-sheets-spreadsheet%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          2















          Google Apps Script. You will need to use Apps Script to add a button or menu item to the sheet and then trigger your python script. You will have to make your python code accessible through some web api and call that api via Apps Script using the UrlFetch service.






          share|improve this answer

























          • We ended up using google app script triggers. In the past, authentication to external web sites was not possible. Now, it is and we abandoned using python's web scraping libraries altogether.

            – rabbitholefinder
            Apr 9 at 14:40















          2















          Google Apps Script. You will need to use Apps Script to add a button or menu item to the sheet and then trigger your python script. You will have to make your python code accessible through some web api and call that api via Apps Script using the UrlFetch service.






          share|improve this answer

























          • We ended up using google app script triggers. In the past, authentication to external web sites was not possible. Now, it is and we abandoned using python's web scraping libraries altogether.

            – rabbitholefinder
            Apr 9 at 14:40













          2














          2










          2









          Google Apps Script. You will need to use Apps Script to add a button or menu item to the sheet and then trigger your python script. You will have to make your python code accessible through some web api and call that api via Apps Script using the UrlFetch service.






          share|improve this answer













          Google Apps Script. You will need to use Apps Script to add a button or menu item to the sheet and then trigger your python script. You will have to make your python code accessible through some web api and call that api via Apps Script using the UrlFetch service.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Mar 28 at 3:43









          ZackZack

          896 bronze badges




          896 bronze badges















          • We ended up using google app script triggers. In the past, authentication to external web sites was not possible. Now, it is and we abandoned using python's web scraping libraries altogether.

            – rabbitholefinder
            Apr 9 at 14:40

















          • We ended up using google app script triggers. In the past, authentication to external web sites was not possible. Now, it is and we abandoned using python's web scraping libraries altogether.

            – rabbitholefinder
            Apr 9 at 14:40
















          We ended up using google app script triggers. In the past, authentication to external web sites was not possible. Now, it is and we abandoned using python's web scraping libraries altogether.

          – rabbitholefinder
          Apr 9 at 14:40





          We ended up using google app script triggers. In the past, authentication to external web sites was not possible. Now, it is and we abandoned using python's web scraping libraries altogether.

          – rabbitholefinder
          Apr 9 at 14:40








          Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.







          Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.



















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55389127%2fwhat-is-a-good-way-to-call-a-python-script-from-a-google-sheets-spreadsheet%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

          Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

          Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript