<?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: get storage size of feature service in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/get-storage-size-of-feature-service/m-p/69877#M5725</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;From ArcGIS Python API &lt;A href="https://developers.arcgis.com/python/guide/Install-and-set-up/"&gt;Install and setup&lt;/A&gt;:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;Install the latest version of Anaconda for Python (for Python 3.5), if you don't already have conda. The ArcGIS Python API requires Python 3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4c4c4c; text-transform: none; text-indent: 0px; letter-spacing: normal; font-family: 'Avenir Next W01', 'Avenir Next W00', 'Avenir Next', Avenir, 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 17px; font-style: normal; font-weight: normal; word-spacing: 0px; float: none; display: inline !important; white-space: normal; orphans: 2; widows: 2; font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px;"&gt;If you have installed ArcGIS Pro 1.3, you already have conda and you can use that instead of downloading Anaconda.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Do you have ArcGIS Pro installed?&amp;nbsp; There is at least one other Python interpreter on your machine, a Python 3&amp;nbsp;interpreter, because it wouldn't be working at all otherwise.&amp;nbsp; Try running the script from the Python installation that Jupyter notebook it using, not a Python 2.7 installation.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 05 Dec 2016 12:59:31 GMT</pubDate>
    <dc:creator>JoshuaBixby</dc:creator>
    <dc:date>2016-12-05T12:59:31Z</dc:date>
    <item>
      <title>get storage size of feature service</title>
      <link>https://community.esri.com/t5/python-questions/get-storage-size-of-feature-service/m-p/69874#M5722</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I know you can get a users storage quota and usage but how do you find out the individual feature class storage&amp;nbsp;of an item using portal py or another method?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Nov 2016 07:12:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/get-storage-size-of-feature-service/m-p/69874#M5722</guid>
      <dc:creator>AlistairFox</dc:creator>
      <dc:date>2016-11-30T07:12:43Z</dc:date>
    </item>
    <item>
      <title>Re: get storage size of feature service</title>
      <link>https://community.esri.com/t5/python-questions/get-storage-size-of-feature-service/m-p/69875#M5723</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The &lt;A href="http://server.arcgis.com/en/portal/latest/administer/windows/portalpy-module.htm" rel="nofollow noopener noreferrer" target="_blank"&gt;PortalPy module &lt;/A&gt;is still around but it is being superseded by the &lt;A href="https://developers.arcgis.com/python/" rel="nofollow noopener noreferrer" target="_blank"&gt;ArcGIS Python API&lt;/A&gt;.&amp;nbsp; I don't believe what you ask is doable directly or only through PortalPy, but you can do it using the new ArcGIS Python API:&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; &lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; arcgis
&lt;SPAN class="operator token"&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&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; url &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="comment token"&gt;# url of Portal or Organizational AGOL&lt;/SPAN&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; username &lt;SPAN class="operator token"&gt;=&lt;/SPAN&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; password &lt;SPAN class="operator token"&gt;=&lt;/SPAN&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; item_name &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="comment token"&gt;# name of item for looking up size&lt;/SPAN&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; 
&lt;SPAN class="operator token"&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; gis &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcgis&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;gis&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;GIS&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;url&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; username&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; password&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&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; item &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; gis&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;content&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;search&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;item_name&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt; &lt;SPAN class="comment token"&gt;# assumes unique name so only 1 item returned&lt;/SPAN&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; item_full &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; gis&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;content&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;get&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;item&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;id&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&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; item_full&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;size
&lt;SPAN class="number token"&gt;3850776&lt;/SPAN&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;&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;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Personally, I got a bit of heartburn over how items are returned when using &lt;SPAN style="font-family: courier new,courier,monospace;"&gt;search&lt;/SPAN&gt; in the new API, but that is a soapbox for another venue and another day.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you don't or can't utilize the ArcGIS Python API, the guts of the code from the &lt;A href="http://server.arcgis.com/en/portal/latest/administer/windows/example-copy-content.htm" rel="nofollow noopener noreferrer" target="_blank"&gt;Example: Copy content &lt;/A&gt;can be used to write a script for accessing an item's size.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 22:41:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/get-storage-size-of-feature-service/m-p/69875#M5723</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2021-12-10T22:41:06Z</dc:date>
    </item>
    <item>
      <title>Re: get storage size of feature service</title>
      <link>https://community.esri.com/t5/python-questions/get-storage-size-of-feature-service/m-p/69876#M5724</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks that helps. I've installed ArcGIS Python and got this running through the Jupyter notebook. Works well. Got your code above working through this too.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Only issue I've hit is trying to get the same code running from a standalone python script. I get the following error.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;gis = arcgis.gis.GIS(url, username, password)&lt;BR /&gt;AttributeError: 'module' object has no attribute 'gis'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Running this under Python 2.7. works fine in a notebook. Any ideas?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Dec 2016 06:26:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/get-storage-size-of-feature-service/m-p/69876#M5724</guid>
      <dc:creator>AlistairFox</dc:creator>
      <dc:date>2016-12-05T06:26:22Z</dc:date>
    </item>
    <item>
      <title>Re: get storage size of feature service</title>
      <link>https://community.esri.com/t5/python-questions/get-storage-size-of-feature-service/m-p/69877#M5725</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;From ArcGIS Python API &lt;A href="https://developers.arcgis.com/python/guide/Install-and-set-up/"&gt;Install and setup&lt;/A&gt;:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;Install the latest version of Anaconda for Python (for Python 3.5), if you don't already have conda. The ArcGIS Python API requires Python 3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4c4c4c; text-transform: none; text-indent: 0px; letter-spacing: normal; font-family: 'Avenir Next W01', 'Avenir Next W00', 'Avenir Next', Avenir, 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 17px; font-style: normal; font-weight: normal; word-spacing: 0px; float: none; display: inline !important; white-space: normal; orphans: 2; widows: 2; font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px;"&gt;If you have installed ArcGIS Pro 1.3, you already have conda and you can use that instead of downloading Anaconda.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Do you have ArcGIS Pro installed?&amp;nbsp; There is at least one other Python interpreter on your machine, a Python 3&amp;nbsp;interpreter, because it wouldn't be working at all otherwise.&amp;nbsp; Try running the script from the Python installation that Jupyter notebook it using, not a Python 2.7 installation.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Dec 2016 12:59:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/get-storage-size-of-feature-service/m-p/69877#M5725</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2016-12-05T12:59:31Z</dc:date>
    </item>
    <item>
      <title>Re: get storage size of feature service</title>
      <link>https://community.esri.com/t5/python-questions/get-storage-size-of-feature-service/m-p/69878#M5726</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks a lot for this!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Dec 2016 19:26:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/get-storage-size-of-feature-service/m-p/69878#M5726</guid>
      <dc:creator>JohnBoyles</dc:creator>
      <dc:date>2016-12-08T19:26:15Z</dc:date>
    </item>
  </channel>
</rss>

