code: def _unique_constrains(cls):
          
          unique = [{c.name for c in u.columns} for u in cls.__table_args__
                    if isinstance(u, UniqueConstraint)]
          unique.extend({c.name} for c in cls.__table__.columns if c.unique)
          return unique
docs: Get all (single column and multi column) unique constraints