Searching the API for Python documentation

553
2
Jump to solution
07-06-2021 04:20 AM
MikeJ
by
New Contributor

Bit of a beginners question, I was wondering how to go about finding the available methods and properties within ArcGIS API for Python, or is it there just no comprehensive list available? The official documentation seems incomplete.

For example, if I get a feature layer item using item = gis.content.get("xxxx") then examine its properties in python by typing dir(item) I can see my feature layer has a property called avgRating.  If I go to the official reference at https://developers.arcgis.com/python/api-reference/ and search for avgRating, its referred to as an option for sorting query results, but there's nothing explicitly saying feature layer items have an avgRating property. 

I'm actually trying to find out if 'favourites' is a property in the api, but the more generic question is how do you find out what's in the api? 

0 Kudos
1 Solution

Accepted Solutions
jcarlson
MVP Esteemed Contributor

As you've found, the official documentation is not 100% complete. You can, of course, make issue requests and even contribute to the documentation yourself at the Python API's github repo.

Short of that, you can also look through the modules themselves. Go to path-to-python-env/Lib/site-packages/arcgis and you can view all the files that make up the ArcGIS Python module. You may find comments and docstrings in the code that aren't in the official documentation that will help you.

- Josh Carlson
Kendall County GIS

View solution in original post

2 Replies
jcarlson
MVP Esteemed Contributor

As you've found, the official documentation is not 100% complete. You can, of course, make issue requests and even contribute to the documentation yourself at the Python API's github repo.

Short of that, you can also look through the modules themselves. Go to path-to-python-env/Lib/site-packages/arcgis and you can view all the files that make up the ArcGIS Python module. You may find comments and docstrings in the code that aren't in the official documentation that will help you.

- Josh Carlson
Kendall County GIS
MikeJ
by
New Contributor

Thanks Josh good to know

0 Kudos