

def all(self, category=None, return_key_and_category=False):
    '\n        Get all tags in this handler.\n\n        Args:\n            category (str, optional): The Tag category to limit the\n                request to. Note that `None` is the valid, default\n                category.\n            return_key_and_category (bool, optional): Return a list of\n                tuples `[(key, category), ...]`.\n\n        Returns:\n            tags (list): A list of tag keys `[tagkey, tagkey, ...]` or\n                a list of tuples `[(key, category), ...]` if\n                `return_key_and_category` is set.\n\n        '
    if ((self._cache is None) or (not _TYPECLASS_AGGRESSIVE_CACHE)):
        self._recache()
    if category:
        category = (category.strip().lower() if (category is not None) else None)
        matches = [tag for tag in self._cache.values() if (tag.db_category == category)]
    else:
        matches = self._cache.values()
    if matches:
        matches = sorted(matches, key=(lambda o: o.id))
        if return_key_and_category:
            return [(to_str(p.db_key), to_str(p.db_category)) for p in matches]
        else:
            return [to_str(p.db_key) for p in matches]
    return []

dataset/ETHPy150Open evennia/evennia/evennia/typeclasses/tags.py TagHandler.all/original