ArcGIS 10.5 introduced a new scripting language for the whole ArcGIS platform, as well as a Python API. Both are covered below.
The Arcade scripting language
Dynamic labeling and visualization has become a lot easier with the release of Arcade, a lightweight scripting language that lets users write, share and execute expressions. These expressions can be created through simple scripts with a scripting interface inside of an application or IDE. What makes Arcade unique is that the expressions are portable, so that they can be used through the whole ArcGIS Platform and not just one or two applications, such as ArcPy.
Arcade’s syntax looks similar to JavaScript and JavaScript developers will directly be at ease with it. In a similar fashion as JavaScript, Arcade enables you to declare variables, perform logical operations, take advantage of built-in functions, and write custom functions. Data is referred to through globals (short for global variables). These start with a dollar sign and represent features from a service or layer, and contain a geometry and set of attributes. Global variables enable you to perform simple calculations using field values at runtime, whereas until now you had to create new fields in an attribute table and use the Field Calculator, write an expression and populate the field values.
As this is the first release of Arcade, you can use it only with ArcGIS Pro, ArcGIS Online and through apps that use the JavaScript and Runtime SDKs. It will become available in more places in later releases. Esri explicitly stated that Arcade is not meant to replace Python now or in the future.
Interested in ArcGIS Python training?
Programming ArcGIS with Python Workshop – Introduction
Programming ArcGIS with Python Workshop – Intermediate