@classmethod
    def create(cls, redis_conn, signature, event=None):
        redis_conn.zadd("categories", signature, 0)
        cat_id = cls.construct_cat_id(signature)
        cat_fields = (
            (cls.SIGNATURE_KEY, signature), (cls.HUMAN_NAME_KEY, cat_id),
            (cls.THRESHOLD_KEY, ""),
        )
        for key, value in cat_fields:
            redis_conn.hset(cls.CAT_META_HASH, "%s:%s" %(cat_id, key), value)

        kwargs = {"cat_id": cat_id}
        if event:
            kwargs["event"] = event
        return cls(redis_conn, **kwargs)
Adds category metadata.
dataset/ETHPy150Open gmcquillan/firetower/firetower/category.py/Category.create