<?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 Re: import ago? in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/import-ago/m-p/1002185#M59079</link>
    <description>&lt;P&gt;I am curious if you were able to successfully import ago and run that script on a PC that didn't have ArcGIS for Desktop installed? I am trying to do that now. Any insight is appreciated. Thanks!&lt;/P&gt;</description>
    <pubDate>Tue, 17 Nov 2020 16:41:20 GMT</pubDate>
    <dc:creator>JamesKelly4</dc:creator>
    <dc:date>2020-11-17T16:41:20Z</dc:date>
    <item>
      <title>import ago?</title>
      <link>https://community.esri.com/t5/python-questions/import-ago/m-p/308227#M23984</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We downloaded as script from this location:&amp;nbsp;&lt;A class="link-titled" href="https://survey123.maps.arcgis.com/home/item.html?id=c8411764ea614f208ba2e5a933a068b8" title="https://survey123.maps.arcgis.com/home/item.html?id=c8411764ea614f208ba2e5a933a068b8" rel="nofollow noopener noreferrer" target="_blank"&gt;https://survey123.maps.arcgis.com/home/item.html?id=c8411764ea614f208ba2e5a933a068b8&lt;/A&gt;&amp;nbsp;; it's a data download utility.&amp;nbsp; At any rate it uses a module I'm not familiar with called 'ago':&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; ago
&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; urllib
&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; zipfile
&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; json&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried to use the ArcGIS Pro package installer and it acts like it installs, but when I try to import I'm told it dosen't exist.&amp;nbsp; So I tried an anaconda install from the command line and it can't find the package in the in the typical channels.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I look for it on the Anaconda cloud, it sends me to:&amp;nbsp;&lt;A class="link-titled" href="https://bitbucket.org/russellballestrini/ago/src/default/" title="https://bitbucket.org/russellballestrini/ago/src/default/" rel="nofollow noopener noreferrer" target="_blank"&gt;Bitbucket&lt;/A&gt;&amp;nbsp; &amp;nbsp;where it is described as 'human readable time deltas' which I can't see how that's going to generate&amp;nbsp; a token as the script itself has it doing:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;agol_helper &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; ago&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;AGOLHelper&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;portal_url&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;print&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"...Authenticating against your Portal "&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;# login&lt;/SPAN&gt;
agol_helper&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;login&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;credentials&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'userName'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; credentials&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'passWord'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Anybody know what this script is and how to make it work?&amp;nbsp; Where do I find the ago&amp;nbsp; we really need?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 14:45:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/import-ago/m-p/308227#M23984</guid>
      <dc:creator>JoeBorgione</dc:creator>
      <dc:date>2021-12-11T14:45:17Z</dc:date>
    </item>
    <item>
      <title>Re: import ago?</title>
      <link>https://community.esri.com/t5/python-questions/import-ago/m-p/308228#M23985</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.esri.com/migrated-users/4422"&gt;Joe Borgione&lt;/A&gt;‌&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://pypi.org/project/ago/" title="https://pypi.org/project/ago/"&gt;ago · PyPI&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can always try a pip install&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-pkgs.html#installing-non-conda-packages" title="https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-pkgs.html#installing-non-conda-packages"&gt;Managing packages — conda 4.8.3.post51+2cdd7ab0 documentation&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 May 2020 23:11:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/import-ago/m-p/308228#M23985</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2020-05-27T23:11:21Z</dc:date>
    </item>
    <item>
      <title>Re: import ago?</title>
      <link>https://community.esri.com/t5/python-questions/import-ago/m-p/308229#M23986</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;other options apparently according to Dr Google&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://stackoverflow.com/questions/12566152/python-x-days-ago-to-datetime" title="https://stackoverflow.com/questions/12566152/python-x-days-ago-to-datetime"&gt;python 'x days ago' to datetime - Stack Overflow&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://dateparser.readthedocs.io/en/latest/" title="https://dateparser.readthedocs.io/en/latest/"&gt;https://dateparser.readthedocs.io/en/latest/&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 May 2020 23:30:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/import-ago/m-p/308229#M23986</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2020-05-27T23:30:17Z</dc:date>
    </item>
    <item>
      <title>Re: import ago?</title>
      <link>https://community.esri.com/t5/python-questions/import-ago/m-p/308230#M23987</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Look at line 52-54 in the script and you will see this note:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="comment token"&gt;# initialize the portal helper class&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;# ago.py is part of the 10.3 python install&lt;/SPAN&gt;
agol_helper &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; ago&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;AGOLHelper&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;portal_url&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
‍‍‍‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I was able to import it using desktop 10.5.&amp;nbsp; So the script is a desktop thing using Python 2.7, apparently.&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; help&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;ago&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
Help on module ago&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;

NAME
    ago &lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt; ago&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;py&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; interact &lt;SPAN class="keyword token"&gt;with&lt;/SPAN&gt; an ArcGIS Portal instance

FILE
    c&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;\program files &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;x86&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;\arcgis\desktop10&lt;SPAN class="number token"&gt;.5&lt;/SPAN&gt;\arctoolbox\scripts\ago&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;py

CLASSES
    __builtin__&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;object
        AGOLHelper
        MultipartFormdataEncoder
    
    &lt;SPAN class="keyword token"&gt;class&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;AGOLHelper&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;__builtin__&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;object&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
     &lt;SPAN class="operator token"&gt;|&lt;/SPAN&gt;  Interact &lt;SPAN class="keyword token"&gt;with&lt;/SPAN&gt; an ArcGIS Portal instance&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; such &lt;SPAN class="keyword token"&gt;as&lt;/SPAN&gt; ArcGIS Online&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt; Must be
     &lt;SPAN class="operator token"&gt;|&lt;/SPAN&gt;  initialized &lt;SPAN class="keyword token"&gt;with&lt;/SPAN&gt; either the login&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; method&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;or&lt;/SPAN&gt; by reusing an existing
     &lt;SPAN class="operator token"&gt;|&lt;/SPAN&gt;  OAuth token via token_login&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt; Covers approximately &lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;/&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;3&lt;/SPAN&gt; of the complete
     &lt;SPAN class="operator token"&gt;|&lt;/SPAN&gt;  API&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; primarily focused on the common operations around uploading &lt;SPAN class="operator token"&gt;and&lt;/SPAN&gt;
     &lt;SPAN class="operator token"&gt;|&lt;/SPAN&gt;  managing services &lt;SPAN class="operator token"&gt;and&lt;/SPAN&gt; web maps&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;

&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt; etc&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 14:45:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/import-ago/m-p/308230#M23987</guid>
      <dc:creator>RandyBurton</dc:creator>
      <dc:date>2021-12-11T14:45:19Z</dc:date>
    </item>
    <item>
      <title>Re: import ago?</title>
      <link>https://community.esri.com/t5/python-questions/import-ago/m-p/308231#M23988</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;this one?&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://github.com/Esri/ago-tools" title="https://github.com/Esri/ago-tools"&gt;GitHub - Esri/ago-tools: A Python package to assist with administering ArcGIS Online Organizations.&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 May 2020 00:57:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/import-ago/m-p/308231#M23988</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2020-05-28T00:57:55Z</dc:date>
    </item>
    <item>
      <title>Re: import ago?</title>
      <link>https://community.esri.com/t5/python-questions/import-ago/m-p/308232#M23989</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well if it agol then there is ago.&lt;/P&gt;&lt;P&gt;But if it about time, then there is ago and other options.&lt;/P&gt;&lt;P&gt;Just figure out which 'ago' you need &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/wink.png" /&gt;&amp;nbsp;but keep the other one handy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 May 2020 01:08:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/import-ago/m-p/308232#M23989</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2020-05-28T01:08:09Z</dc:date>
    </item>
    <item>
      <title>Re: import ago?</title>
      <link>https://community.esri.com/t5/python-questions/import-ago/m-p/308233#M23990</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It's the ago as in AGO&amp;nbsp; L ...&amp;nbsp; One of my office mates was confronted with this; I'm strictly ArcGIS Pro, Python 3.x; he's got an install of ArcMap 10.5 (maybe 10.6).&amp;nbsp; We'll take a look at it together later today.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 May 2020 12:46:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/import-ago/m-p/308233#M23990</guid>
      <dc:creator>JoeBorgione</dc:creator>
      <dc:date>2020-05-28T12:46:56Z</dc:date>
    </item>
    <item>
      <title>Re: import ago?</title>
      <link>https://community.esri.com/t5/python-questions/import-ago/m-p/308234#M23991</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.esri.com/migrated-users/34565"&gt;Randy Burton&lt;/A&gt;‌ - I see.&amp;nbsp; My office mate was using Spyder with python 3.x to review the script.&amp;nbsp; I'll have him spark up a 2.7 - idle on a screen share session and go from there.&amp;nbsp; Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 May 2020 12:51:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/import-ago/m-p/308234#M23991</guid>
      <dc:creator>JoeBorgione</dc:creator>
      <dc:date>2020-05-28T12:51:38Z</dc:date>
    </item>
    <item>
      <title>Re: import ago?</title>
      <link>https://community.esri.com/t5/python-questions/import-ago/m-p/1002185#M59079</link>
      <description>&lt;P&gt;I am curious if you were able to successfully import ago and run that script on a PC that didn't have ArcGIS for Desktop installed? I am trying to do that now. Any insight is appreciated. Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 17 Nov 2020 16:41:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/import-ago/m-p/1002185#M59079</guid>
      <dc:creator>JamesKelly4</dc:creator>
      <dc:date>2020-11-17T16:41:20Z</dc:date>
    </item>
  </channel>
</rss>

