code: def resource_property(klass, name, **kwargs):
      
      klass.PROPERTIES[name] = kwargs
  
      def getter(self):
          return getattr(self, '_%s' % name, kwargs.get('default', None))
  
      if kwargs.get('readonly', False):
          setattr(klass, name, property(getter))
      else:
          def setter(self, value):
              setattr(self, '_%s' % name, value)
          setattr(klass, name, property(getter, setter))
docs: Builds a resource object property.