Read srid of a shapefile
from osgeo import ogr, osr
shapefile = ogr.Open("shapefile.shp")
prj = ogr.Open("shapefile.prj")
layer = shapefile.GetLayer(0)
crs = layer.GetSpatialRef()
prj_file = open("shapefile.prj", 'r')
prj_txt = prj_file.read()
srs = osr.SpatialReference()
srs.ImportFromESRI([prj_txt])
print('Shape prj is: %s' % prj_txt)
print('WKT is: %s' % srs.ExportToWkt())
print('Proj4 is: %s' % srs.ExportToProj4())
srs.AutoIdentifyEPSG()
print('EPSG is: %s' % srs.GetAuthorityCode(None))