Created
April 26, 2025 15:54
-
-
Save ichux/c761e89bccc16b3c8c1643c078c222f0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import logging | |
logging.basicConfig( | |
**{ | |
"level": logging.DEBUG, | |
"format": "%(asctime)s - %(message)s", | |
"datefmt": "%Y-%m-%d %H:%M:%S", | |
} | |
) | |
class DataManager: | |
def __init__(self): | |
self._latest_data = {} | |
@property | |
def latest_data(self): | |
return self._latest_data | |
@latest_data.setter | |
def latest_data(self, value): | |
self._latest_data = value | |
dm = DataManager() | |
if __name__ == "__main__": | |
dm.latest_data = True | |
logging.info(dm.latest_data) | |
dm.latest_data = False | |
logging.info(dm.latest_data) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment