Mapbox line labels/arrows via geojson layer's layout property

I’m trying to add labels and arrows to my map’s lines using the technique outlined here http://jsfiddle.net/brianssheldon/wm18a33d/27/ and https://stackoverflow.com/questions/46102553/showing-direction-arrow-on-line-in-mapboxgl which both use the ‘layout’ property of the mapbox layer. However, it appears that ‘layout’ is not supported in the Python API.

Basically, the layers are defined as so:
layers=[dict(sourcetype = ‘geojson’,
source={‘type’: ‘FeatureCollection’, ‘features’: line_features},
type=‘line’,
line=dict(width=8),
color=‘red’,
),
dict(sourcetype = ‘geojson’,
source={‘type’: ‘FeatureCollection’, ‘features’: line_features},
type=‘symbol’,
layout={‘symbol-placement’: ‘line’, ‘text-field’: ‘{title}’, ‘text-size’: 16}),
]

Which results in ‘plotly.exceptions.PlotlyDictKeyError: ‘layout’ is not allowed in ‘layer’’. Is there an alternate way of implementing arrows/line labels using the geojson source? I tried creating lines via Scattermapbox, but I have >20k lines and it was extraordinarily slow (at least when used via Dash). Is it easy to expose this property to the API and how would one do so beyond simple steps of adding to the Python Layer object?