<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic How to call Python script from ESRI Javascript in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-call-python-script-from-esri-javascript/m-p/1197753#M78119</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;is it possible to send a request to python script with custom parameters and catch response what ever script returns using ESRI Javascript 3.x ?&lt;/P&gt;&lt;P&gt;If yes please provided an step for starting.&lt;/P&gt;&lt;P&gt;Requirement : For generating token in python and consuming same token in ESRI web application&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 31 Jul 2022 14:03:56 GMT</pubDate>
    <dc:creator>Tarunvisvanadula1994</dc:creator>
    <dc:date>2022-07-31T14:03:56Z</dc:date>
    <item>
      <title>How to call Python script from ESRI Javascript</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-call-python-script-from-esri-javascript/m-p/1197753#M78119</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;is it possible to send a request to python script with custom parameters and catch response what ever script returns using ESRI Javascript 3.x ?&lt;/P&gt;&lt;P&gt;If yes please provided an step for starting.&lt;/P&gt;&lt;P&gt;Requirement : For generating token in python and consuming same token in ESRI web application&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 31 Jul 2022 14:03:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-call-python-script-from-esri-javascript/m-p/1197753#M78119</guid>
      <dc:creator>Tarunvisvanadula1994</dc:creator>
      <dc:date>2022-07-31T14:03:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to call Python script from ESRI Javascript</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-call-python-script-from-esri-javascript/m-p/1198036#M78128</link>
      <description>&lt;P&gt;Python can't run in the browser so you have to put it on a server. I've set up specific tasks to do something like that by using Flask (a Python module) to create microservices, the Python accepts HTTP requests and then returns data as JSON or HTML. For example I have it query the ArcGIS License server to find out what concurrent licenses are in use.&amp;nbsp;&lt;/P&gt;&lt;P&gt;What you are trying to do is best done directly from your Javascript. The Python API that Esri provides is really just a wrapper around the REST services. Look at the "esri" module.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/javascript/3/jsapi/credential-amd.html" target="_blank"&gt;https://developers.arcgis.com/javascript/3/jsapi/credential-amd.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;They have some OAUTH samples in the Guide section here&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/javascript/3/jssamples/portal_oauth_inline.html" target="_blank"&gt;https://developers.arcgis.com/javascript/3/jssamples/portal_oauth_inline.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/javascript/3/jssamples/portal_oauth_popup.html" target="_blank"&gt;https://developers.arcgis.com/javascript/3/jssamples/portal_oauth_popup.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Aug 2022 15:33:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-call-python-script-from-esri-javascript/m-p/1198036#M78128</guid>
      <dc:creator>Brian_Wilson</dc:creator>
      <dc:date>2022-08-01T15:33:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to call Python script from ESRI Javascript</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-call-python-script-from-esri-javascript/m-p/1198122#M78136</link>
      <description>&lt;P&gt;If you are talking about generating ESRI Portal token, you don't need a Python for that. ESRI has a Rest API to do just that.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/rest/users-groups-and-items/generate-token.htm" target="_blank"&gt;https://developers.arcgis.com/rest/users-groups-and-items/generate-token.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But if your python script doing more than just generating a token, then consider creating a custom Geoprocessing Tool. Import your python script into the Tool and then publish it to ArcGIS Server. That way it is available to access on the Web and use it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Aug 2022 17:50:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-call-python-script-from-esri-javascript/m-p/1198122#M78136</guid>
      <dc:creator>shay-geo</dc:creator>
      <dc:date>2022-08-01T17:50:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to call Python script from ESRI Javascript</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-call-python-script-from-esri-javascript/m-p/1198150#M78137</link>
      <description>&lt;P&gt;I am so used to setting up Flask microservices that don't require any geoproccessing that I forget it is an option! Thanks&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/77625"&gt;@shay-geo&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Aug 2022 18:14:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-call-python-script-from-esri-javascript/m-p/1198150#M78137</guid>
      <dc:creator>Brian_Wilson</dc:creator>
      <dc:date>2022-08-01T18:14:36Z</dc:date>
    </item>
  </channel>
</rss>

