>>> from shapely.geometry import LineString
>>> from shapely.wkb import loads
>>> from osgeo import ogr
>>> def project(geom, from_epsg, to_epsg):
... to_srs = ogr.osr.SpatialReference()
... to_srs.ImportFromEPSG(to_epsg)
... from_srs = ogr.osr.SpatialReference()
... from_srs.ImportFromEPSG(from_epsg)
... ogr_geom = ogr.CreateGeometryFromWkb(geom.wkb)
... ogr_geom.AssignSpatialReference(from_srs)
... ogr_geom.TransformTo(to_srs)
... return loads(ogr_geom.ExportToWkb())
>>> ligne = LineString([[4,50], [5,51]])
>>> ligne.wkt
LINESTRING (4 50, 5 51)
>>> ligneproj = project(ligne, from_epsg=4326, to_epsg=31370)
>>> ligneproj.wkt
'LINESTRING (123742.1348178901971551 76638.2337631648406386, 194490.5125554261030629 188001.2492922432720661)'