If you want it to be computed during class definition, see the chepner answer - although I would recommend using the module level function instead.
If you want it to be lazily evaluated, you might be interested cached_property.
>>> from random import random
>>> from cached_property import cached_property
>>> class Foo(object):
... @cached_property
... def one_off_thing(self):
... print('computing...')
... return random()
...
>>> foo = Foo()
>>> foo.one_off_thing
computing...
0.5804382038855782
>>> foo.one_off_thing
0.5804382038855782
. , Python, . Python 3, functools.lru_cache, .