I have made a tutorial for DOLFINx, which includes 3D problems such as: Hyperelasticity — FEniCSx tutorial
and
Using the GMSH Python API to generate complex meshes | Jørgen S. Dokken
If you are interested in old dolfin, the documentation features some 3D examples as well:
https://fenicsproject.org/olddocs/dolfin/latest/python/demos/hyperelasticity/demo_hyperelasticity.py.html
There is no fundamental difference between enforcing boundary conditions on a 2D or 3D geometry in DOLFIN/DOLFINx