Update of the most popular answer using the latest version of pyproj (presently 3.3.1), and with some extra tips for different co-ordinate systems.
As mentioned shapely is agnostic to coordinate system, so use pyproj to convert to a co-ordinate system in metres.
from shapely.ops import transform
from shapely.geometry import LineString
from pyproj import Transformer
transformer = Transformer.from_crs("epsg:4326", "epsg:32633")
line1 = LineString([(15.799406, 40.636069), (15.810173,40.640246)])
line2 = transform(transformer.transform, line1)
print(str(line2.length) + " meters")
# 1400.1203731431115 meters
If like me you are using co-ordinates in (lng, lat) or (x,y) form, then you'll need to add a parameter to the transformer creation method:
transformer = Transformer.from_crs("epsg:4326", "epsg:32633", always_xy=True)
In this case I'm converting to the co-ordinate system used in the answer I linked, but your co-ordinates might be in a different part of the world. You can use https://epsg.io/ to search for your particular country or co-ordinate system. In my case I had co-ordinates in Mexico, so I used "epsg:4484":
transformer = Transformer.from_crs("epsg:4326", "epsg:4484", always_xy=True)