I usually use the pyrevit.revit.db.query.get_elements_by_categories function for this.
from pyrevit.revit import query, DB
elements = query.get_elements_by_categories([DB.BuiltInCategory.OST_ElectricalFixtures])
I’m afraid pyrevit library doesn’t include a way to specify the category using the name; I had to build a dictionary that maps the names to the corresponding builtin category enumeration