On the way to discover the analogy of the common desktop GIS procedures to Python we assumed that the process of extracting contours from raster was well documented or there were many tutorials on the topic. We found that there weren't many options to complete this process successfully or with few amount of pain, therefore we have done a complete tutorial on the process to create contours from a elevation raster with Python and GDAL that includes input data, scripts, and a discussion over the main steps of processing.
There are two ways to represent the resulting contour shapefiles, the first one is in QGIS and the second is inside Jupyter with Ipyleaflet.
You download the input data from this link: