Assuming that the mesh is consting of linear triangles, you can get this with the following code:
import dolfinx
from mpi4py import MPI
import ufl
mesh = dolfinx.mesh.create_unit_square(MPI.COMM_WORLD, 2, 1)
DG0 = dolfinx.fem.FunctionSpace(mesh, ("DG", 0))
v = ufl.TestFunction(DG0)
cell_area_form = dolfinx.fem.form(v*ufl.dx)
cell_area = dolfinx.fem.assemble_vector(cell_area_form)
print(cell_area.array)