<?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: GIS Object -- Py 2.7 or Py 3.x in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/gis-object-py-2-7-or-py-3-x/m-p/1281300#M8622</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/633156"&gt;@kapalczynski&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Firstly , I think you are mixing &lt;EM&gt;arcpy&lt;/EM&gt; vs &lt;EM&gt;arcgis&lt;/EM&gt; library. Both are completely different libraries with specific aim. &lt;EM&gt;arcpy&lt;/EM&gt; focused on bringing desktop arcobjects tools ready to your python scripts and &lt;EM&gt;arcgis &lt;/EM&gt;is the standard library to use on web-based GIS (management tasks, spatial analysis, etc.).&lt;/P&gt;&lt;P&gt;GIS Object (or class) is available only through &lt;EM&gt;arcgis&lt;/EM&gt; library. In some Python environments (like in ArcGIS PRO's or Server's default env) you may use either of them depending on your workflow.&lt;/P&gt;&lt;P&gt;Secondly, Python 2.7 was officially retired in 2020, so &lt;STRONG&gt;stick to Py3&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;</description>
    <pubDate>Fri, 21 Apr 2023 14:53:47 GMT</pubDate>
    <dc:creator>Kepa</dc:creator>
    <dc:date>2023-04-21T14:53:47Z</dc:date>
    <item>
      <title>GIS Object -- Py 2.7 or Py 3.x</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/gis-object-py-2-7-or-py-3-x/m-p/1281242#M8619</link>
      <description>&lt;P&gt;I am trying to use the GIS Object in python to query against my AGOL.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Right now the only way I can get this to work is if I use .py 3.x&lt;/P&gt;&lt;P&gt;Is there a way to use this object from .py 2.7 with "import arcpy"?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;from arcgis.gis import GIS
import arcgis

agol_username = 'xxxx' 
agol_password = 'xxxx'  
output_csv = r'C:\Users\ccc\Desktop\GIS_projects\AGOL_Python\UsersAboutToExpire.csv'
search_user = '*'

gis = GIS('https://xxx.maps.arcgis.com', agol_username, agol_password)
user_list = gis.users.search(query=search_user, max_users=2000)
roles = gis.users.roles.all()
rol_ids = {role.role_id: role.name for role in roles}
output = []&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Apr 2023 12:03:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/gis-object-py-2-7-or-py-3-x/m-p/1281242#M8619</guid>
      <dc:creator>kapalczynski</dc:creator>
      <dc:date>2023-04-21T12:03:00Z</dc:date>
    </item>
    <item>
      <title>Re: GIS Object -- Py 2.7 or Py 3.x</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/gis-object-py-2-7-or-py-3-x/m-p/1281300#M8622</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/633156"&gt;@kapalczynski&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Firstly , I think you are mixing &lt;EM&gt;arcpy&lt;/EM&gt; vs &lt;EM&gt;arcgis&lt;/EM&gt; library. Both are completely different libraries with specific aim. &lt;EM&gt;arcpy&lt;/EM&gt; focused on bringing desktop arcobjects tools ready to your python scripts and &lt;EM&gt;arcgis &lt;/EM&gt;is the standard library to use on web-based GIS (management tasks, spatial analysis, etc.).&lt;/P&gt;&lt;P&gt;GIS Object (or class) is available only through &lt;EM&gt;arcgis&lt;/EM&gt; library. In some Python environments (like in ArcGIS PRO's or Server's default env) you may use either of them depending on your workflow.&lt;/P&gt;&lt;P&gt;Secondly, Python 2.7 was officially retired in 2020, so &lt;STRONG&gt;stick to Py3&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;</description>
      <pubDate>Fri, 21 Apr 2023 14:53:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/gis-object-py-2-7-or-py-3-x/m-p/1281300#M8622</guid>
      <dc:creator>Kepa</dc:creator>
      <dc:date>2023-04-21T14:53:47Z</dc:date>
    </item>
    <item>
      <title>Re: GIS Object -- Py 2.7 or Py 3.x</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/gis-object-py-2-7-or-py-3-x/m-p/1281321#M8623</link>
      <description>&lt;P&gt;OK thanks... Yea 3.x is the only one I can run it on.... Sadly our server is not there yet...&amp;nbsp; Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 21 Apr 2023 15:32:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/gis-object-py-2-7-or-py-3-x/m-p/1281321#M8623</guid>
      <dc:creator>kapalczynski</dc:creator>
      <dc:date>2023-04-21T15:32:57Z</dc:date>
    </item>
  </channel>
</rss>

