diff --git a/python/opendht.pyx b/python/opendht.pyx index 1ffbb03c695bad8d8010a23069064659ff0ec06c..c31ca8e6b168ac6940682435d0626e641240d219 100644 --- a/python/opendht.pyx +++ b/python/opendht.pyx @@ -187,6 +187,11 @@ cdef class Value(object): return string(<char*>self._value.get().data.data(), self._value.get().data.size()) def __set__(self, bytes value): self._value.get().data = value + property user_type: + def __get__(self): + return self._value.get().user_type.decode() + def __set__(self, str t): + self._value.get().user_type = t.encode() property id: def __get__(self): return self._value.get().id