The Fiona library provides a simple Python API around the OGR library for data access and nothing more. This approach makes it easy to use and is less verbose than OGR while using Python. Fiona outputs GeoJSON by default. You can find a wheel file for Fiona at http://www.lfd.uci.edu/~gohlke/pythonlibs/#fiona.
As an example, we'll use the GIS_CensusTract_poly.shp file from the dbfpy example we looked at earlier in this chapter.
First, we'll import fiona and Python's pprint module to format the output. Then, we'll open the shapefile and check its driver type:
>>> import fiona
>>> from pprint import pprint
>>> f = fiona.open("GIS_CensusTract_poly.shp")