Last active
September 1, 2020 00:11
-
-
Save lastlegion/932187758b4e219c79f41a68a6d2a2c3 to your computer and use it in GitHub Desktop.
This file contains 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 Repository: | |
def __init__(self, db: str): | |
self.db = db | |
def get_data(self): | |
return 'Hello World' | |
class Service: | |
def __init__(self, repsoitory: Repository): | |
self.repsoitory = repsoitory | |
def process(self): | |
return self.repsoitory.get_data() | |
class UI: | |
def __init__(self, service: Service): | |
self.service = service | |
def render(self): | |
print(self.service.process()) | |
if __name__ == '__main__': | |
ui = UI(Service(DAL(db=os.getenv('db')))) | |
ui.render() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment