swarmauri.standard.utils.get_class_hash module
- swarmauri.standard.utils.get_class_hash.get_class_hash(cls)[source]
Generates a unique hash value for a given class.
This function uses the built-in hashlib and inspect modules to create a hash value based on the class’ methods and properties. The members of the class are first sorted to ensure a consistent order, and then the hash object is updated with each member’s name and signature.
Parameters: - cls (type): The class object to calculate the hash for.
Returns: - str: The generated hexadecimal hash value.