I have created an arcpy Python toolbox. I want to publish this to server (10.6.1) as a geoprocessing service programmatically. Ideally the machine used to deploy should not need to have an installation of ArcGIS Desktop. Is it possible to do this through the ArcGIS API for Python (1.5.x)? If not what options are available for doing this programmatically?
ArcGIS Python API was built to work with Portal / AGOL, and also some capacity of spatial analysis. to publish a geoprocessing service, use ArcPy instead. here is an example: