Ok Im tired of trying to figure this out based on the documentation for the API. All I want to do is stop a geocoding service so I can rebuild the locators and then restart it. We are not using portal here. Running the lines below returns "AttributeError: 'Server' object has no attribute 'services'" even though dir(site) shows that "services" is there. I am on v1.3.0 of the API. This is the best result I have gotten. Trying to import arcgis or from arcgis import gis and creating the server object by arcgis.gis.server.Server() always just gets me "AttributeError: module 'arcgis.gis' has no attribute 'server'".
<SPAN class="keyword token">from</SPAN> arcgis<SPAN class="punctuation token">.</SPAN>gis <SPAN class="keyword token">import</SPAN> server
site <SPAN class="operator token">=</SPAN> server<SPAN class="punctuation token">.</SPAN>Server<SPAN class="punctuation token">(</SPAN>url<SPAN class="operator token">=</SPAN><SPAN class="string token">''</SPAN><SPAN class="punctuation token">,</SPAN>
username <SPAN class="operator token">=</SPAN> <SPAN class="string token">''</SPAN><SPAN class="punctuation token">,</SPAN>
password<SPAN class="operator token">=</SPAN><SPAN class="string token">''</SPAN><SPAN class="punctuation token">)</SPAN>
site<SPAN class="punctuation token">.</SPAN>services<SPAN class="punctuation token">.</SPAN>list<SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>