Manish Khatri
08/23/2023, 9:55 PMConfigurableResource
, what’s the recommended approach for having a field that is required to store an intermediate value? E.g.:
class MyResource(ConfigurableResource):
user: str
password: str
_session_token: str
def authenticate(self):
# will get a session auth token from API.
# Will use token to fetch some data from an API
self._session_token = some_function()
In the above example an Exception will be thrown: AttributeError: 'MyResource' object has no attribute '_session_token'
Zach
08/23/2023, 10:02 PM