Created
November 16, 2023 17:46
-
-
Save fsndzomga/2e5b2dd44c964c4a00b1c6142c0d734e 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
class DataFetcher: | |
def fetch_data(self, url): | |
# code to fetch data from a URL | |
return {"example": "data"} | |
class DataProcessor: | |
def process_data(self, data): | |
# code to process data | |
return {k: v.upper() for k, v in data.items()} | |
class DataPresenter: | |
def display_data(self, data): | |
# code to display data | |
print(data) | |
if __name__ == "__main__": | |
fetcher = DataFetcher() | |
processor = DataProcessor() | |
presenter = DataPresenter() | |
data = fetcher.fetch_data("http://example.com") | |
processed_data = processor.process_data(data) | |
presenter.display_data(processed_data) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment