ArcGIS Python API is a powerful, modern, and easy to use pythonic library that you can use to perform common administrative tasks, such as creating and managing users and groups, publishing and updating items, monitoring server usage, and so on. In addition to performing powerful visualization and data analysis, it also allows you to script complex tasks such as transferring ownership of items and cloning portals.
In addition to batch processing scripts, the API can be used within a browser-based interactive scripting environment called Jupyter Notebook. The notebook environment provides an interface to try and execute code, visualize portal items, users, and groups, as well as view web layers, maps, and scenes interactively.
The API is built as modules that make it straightforward to learn and use. The gis module is the entry point and provides an information model to access and program your portal. The gis module provides various classes that you can use to create and manage users and their groups and items. The features and raster modules allow access feature and raster layers, including performing analysis. The geoanalytics module allows execution of big data tools. To learn more about the rest of the modules and the architecture of the API, see the API overview.
The API is distributed as a Python package and can be installed using conda, which is a popular Python package and environment management system. The instructions for setup are documented on the ArcGIS for Developers site.