Ogrinfo is available nowadays also as a Python library function gdal.VectorInfo
and it is very easy to use.
from osgeo import gdal, ogr
gdal.VectorInfo("point.shp")
"INFO: Open of `point.shp'\n using driver `ESRI Shapefile' successful.\n\nLayer name: point\nMetadata:\n DBF_DATE_LAST_UPDATE=2023-03-01\nGeometry: Point\nFeature Count: 3\nExtent: (7156402.165550, 207.123904) - (7156409.373471, 210.034795)\nLayer SRS WKT:\n(unknown)\nattr: String (1.0)\nnewcol: String (1.0)\nmy_fid: Integer (3.0)\n"