Is there a standard way for creating class level variables in an abstract base class (ABC) that we want derived classes to define?
I could implement this with properties as follows:
from abc import ABC
from abc import abstractmethod
class Parent(ABC):
@property
@abstractmethod
def provider(self) -> str:
"""The provider that the payload generator is applicable for"""
raise NotImplementedError()
class Child(Parent):
@property
def provider(self) -> str:
return 'some provider'
But properties are linked to instances and not classes. Is there a way I can implement similar functionality for a class variable in Python 3.6+?