# Gimp.Unit.get_id

    @accepts(Gimp.Unit)
    @returns(gint32)
    def get_id(self):
        # Python wrapper for gimp_unit_get_id()

The ID can be used to retrieve the unit with [func@Unit.get_by_id].

Note that this ID will be stable within a single session of GIMP, but you should not expect this ID to stay the same across multiple runs.

self

  The unit you want to know the integer ID of.

Returns