Scripting and programming languages leverage most of the problem-solving in science; spatial science is not an exception to this. As a high-level programming language, python brings a lot of flexibility and features to deploy in GIS. Its usage as a scripting language enables automation of certain functionalities within another program (e.g. arcpy for ArcGIS). Therefore, it is not a surprise that it is the most widely used language in spatial science. It is easy to use due to its simple syntax, and power as an object-oriented language. You don’t need to have the specialist knowledge of programming since it hides much of the technical details that system programming languages need to handle. The most outstanding application possibilities of python in spatial science can be discussed under spatial data handling, spatial data analysis, and spatial data visualization.
Spatial Data Handling
Without any question, data is the core of any GIS project. Thanks to the new developments in the technology and computational science, data acquisition and data quality are increasing intensely which brings the necessity to manage data most efficiently. Especially in spatial science, when we are dealing with complex models and higher dimensions, the need for a computationally boost up becomes compulsory. Therefore, parallel computing solutions by using python libraries, such as PyOpenCL, ParallelPython(PP), and Multiprocessing are getting attention. As an extensive advanced spatial analysis and geospatial file handling example, Rey and his co-workers , introduced parallelization across the spatial analysis with Python Spatial Analysis Library (PySAL) which can be reached from http://code.google.com/p/pysal. .
Popular python data analysis library Pandas has been extended to Geopandas in order to allow users to do spatial operations. It makes it possible to add a base map for your existing plot by only writing less than 20 lines of code and executes the whole process with a total running time of less than a minute. Examples and documentation of this open-source project can be found in http://geopandas.org/gallery/index.html.
Spatial Data Analysis
Esri’s python library arcpy enables users to both handle and analyze spatial data by calling some built-in tools which ArcGIS users are familiar with. For someone who would like to start with arcpy, Python Scripting for ArcGIS (Amazon affiliate link) is a fundamental book to begin with. The book is designed to introduce python scripting for people who have no experience of writing codes .
In order to write and compile your stand-alone spatial analysis python scripts, the first thing is to install a user-friendly IDLE (integrated development environment) so that you can debug and test your codes. For the ArcGIS user, there is no additional cost to install python or any editor since the software already comes with this option. However, if you are seeking other options, such as open source alternatives, a useful software bundle Anaconda  helps as an IDLE for Linux, Windows and Mac OS X users to download scientific packages, manage libraries and dependencies in Conda environment. Examples of this type of standalone spatial applications are getting popularity environmental modeling in especially in uncertainty and sensitivity analysis for land suitability evaluation, urban growth and land-use change, and flood vulnerability .
Especially when working with raster data, numpy library, which is the fundamental package for any scientific computing with python, brings an ability to handle powerful multi-dimensional arrays. Extensive online support and tutorials can be found at https://www.numpy.og. PCRasterPython library, which is developed by Karssenberg and his co-authors , is another useful Python library for matrix algebra and for modelling in 3D.
Spatial Data Visualization
After handling and analyzing the spatial data, the representation of the final output is the last but far the least part of a project. The effort becomes to produce maps that are effective to reach target audiences. Cartopy and Descartes have extensive cartography tools for making pretty maps. With its complete 2D and limited 3D support, matplotlib is a useful library to produce any publication quality figures. It is also possible to use cartopy along with matplotlib if you are interested to add any graph on your existing map .
Overall, whether you are a native python speaker or a beginner, python is a powerful language to communicate with a computer to solve the spatial communication of GIS users.
 Rey, S.J. and Anselin, L., 2010. PySAL: a Python library of spatial analytical methods. In: M.M. Fischer and A. Getis, eds. Handbook of applied spatial analysis. Berlin: Springer, 175–193.
 Sergio J. Rey, Luc Anselin, Robert Pahle, Xing Kang & Philip Stephens (2013) Parallel optimal choropleth map classification in PySAL, International Journal of Geographical Information Science, 27:5, 1023-1039, DOI: 10.1080/13658816.2012.752094
 Zandbergen, P.A.(2013). Python Scripting for ArcGIS. ESRI Press, Redlands, California.
 Ligmann-Zielinska, A. and Jankowski, P., 2014. Spatially-explicit integrated uncertainty and sensitivity analysis of criteria weights in multicriteria land suitability evaluation. Environmental Modelling and Software, 57, 235–247. https://doi.org/10.1016/j.envsoft.2014.03.007
 Seda Şalap-Ayça, Piotr Jankowski, Keith C Clarke, Phaedon C Kyriakidis & Atsushi Nara (2018) A meta-modeling approach for spatio-temporal uncertainty and sensitivity analysis: an application for a cellular automata-based Urban growth and land-use change model, International Journal of Geographical Information Science, 32:4, 637-662, DOI: 10.1080/13658816.2017.1406944
 Mariana Madruga de Brito, Adrian Almoradie & Mariele Evers (2019): Spatially explicit sensitivity and uncertainty analysis in a MCDA-based flood vulnerability model, International Journal of Geographical Information Science, DOI: 10.1080/13658816.2019.1599125
 D. Karssenberg, K. de Jong & J. van der Kwast (2007) Modelling landscape dynamics with Python, International Journal of Geographical Information Science, 21:5, 483-495, DOI: 10.1080/13658810601063936
 Using cartopy with matplotlib https://scitools.org.uk/cartopy/docs/latest/matplotlib/intro.html