Python – how can I get the class name from within a class method – using @classmethod July 31, 2023 by Tarik A classmethod receives the class as its argument. That’s why you’re calling it cls. Just do cls.__name__.