2

is there any possibility to get information/values from hosted ArcGIS Online tables for a locally running python script without using the ArcGIS REST API?

  • 1
    I don't think there's any way around this from a python perspective...The only way you can get at hosted feature layers from a python script is through the REST API unless I'm mistaken. It is super easy to do though, so what is the downside of using the REST API? There are several python wrappers for esri's REST API out there to make it a very short script. – crmackey Mar 21 '17 at 22:15
  • 1
    Take a look at the ArcGIS Python API developers.arcgis.com/python/guide – Simon Apr 1 '17 at 6:33
  • 1
    Just add the table (or feature class) as a layer to ArcGIS Pro – BERA Jun 8 '18 at 12:15
2

You can use ArcGIS API for Python.

Here is the sample on how to access and manipulate the data in the feature layer:

https://developers.arcgis.com/python/guide/working-with-feature-layers-and-features/

1

You could wrap the ArcGIS REST API to provide a more pythonic interface. Thats what https://github.com/Esri/ArcREST did.

I wanted to connect agol to pandas...not stable, just some thoughts: https://github.com/brendancol/agol-pandas/blob/master/agolpandas/agol.py

  • 1
    ArcRest is an absolute abomination designed by people inexperienced in API design and coding. – Jason Scheirer Mar 22 '17 at 4:04
  • 1
    @JasonScheirer, ArcREST might have its downsides but this is the only Python API into ArcGIS Online available. Yes, Esri has released ArcGIS Python API, but this one would never be the complete mirror of the REST API. I wouldn't refer to ArcREST as "abomination" as I have been using it for countless number of scripts and workflows within a larger program and it worked great. I think most people using ArcREST need to script things, not to build independent enterprise systems where the quality of API design might matter. In this context, ArcREST is superb. – Alex Tereshenkov Mar 22 '17 at 7:32
  • Thanks so far! I didn't work with python for quite some time and ArcGIS Online is pretty new to me. I'm searching for an easy way to access particular rows or columns for if/else statements or whatever. So there's no need big features etc. Just some simple scritping. Something I can manage quite easily with .mxds or .gdbs on my local hard disk but I just can't get my head around the ArcGIS Online stuff. – aldec Mar 22 '17 at 14:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.