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?

3
  • 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
    Commented Mar 21, 2017 at 22:15
  • 1
    Take a look at the ArcGIS Python API developers.arcgis.com/python/guide
    – jakc
    Commented Apr 1, 2017 at 6:33
  • 1
    Just add the table (or feature class) as a layer to ArcGIS Pro
    – Bera
    Commented Jun 8, 2018 at 12:15

2 Answers 2

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

3
  • 1
    ArcRest is an absolute abomination designed by people inexperienced in API design and coding. Commented Mar 22, 2017 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. Commented Mar 22, 2017 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
    Commented Mar 22, 2017 at 14:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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