How to create a 3d histogram with plotly?

I’m trying to build a 3d histogram, of the kind the can be done in matplotlib with hist3d.

Is there a straightforward way to do this with plotly? I guess mesh3d could be used for the purpose, but it would require to translate the dataset in the form of a mesh, which I’m not sure how to do.

If it was possible to draw primitive 3D graphics objects (cuboids and such) that would also allow to build hist3d-like function with relative ease, but it seems that shapes are only 2D.

How can I achieve this?