/usr/lib/python3/dist-packages/restless/data.py is in python3-restless 2.1.1-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | class Data(object):
def __init__(self, value, should_prepare=True, prepare_with=None):
"""
A container object that carries meta information about the data.
``value`` should be the data to be returned to the client. This may
be post-processed.
``should_prepare`` determines whether additional post-processing
should occur & should be boolean. This is useful when returning objects
or with complex requirements. Default is ``True``.
``prepare_with`` is reserved for future use in specifying a custom
callable. Default is ``None`` (no custom callable).
"""
self.value = value
self.should_prepare = should_prepare
self.prepare_with = prepare_with
|