Python has always had strong internet capabilities. The standard library includes models for HTTP processing, STMP messages, and URL requests. Thousands of third-party modules have been written to extend or improve the built-in web functionality. Over time, a few modules coalesced into Python web frameworks—code libraries written to manage the creation and maintenance of complex and dynamic websites.
To better understand how to use a Python web framework and how to add geospatial capabilities, we'll implement the Flask Model View Controller (MVC) framework. A pure Python web framework, Flask can be combined with SQLAlchemy, GeoAlchemy2, and the Jinja2 HTML template system to create geospatially-enabled web pages.
In this chapter, you will learn about:
- The Flask web framework
- SQLAlchemy database management
- GeoAlchemy2
- Connecting to PostGIS using object-relational mapping (ORM)
- The Jinja2 web page template system