Created
October 17, 2017 15:00
-
-
Save Weyzu/40ff34a65c2bccfaf7113434ef17c64c to your computer and use it in GitHub Desktop.
daft_blog_06.py
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 PersonRepository: | |
@db_session | |
def create(self, name, age): | |
return Person(name=name, age=age) | |
@db_session | |
def get_by_name(self, name): | |
return list(select(p for p in Person if p.name == name)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment