Skip to content

Instantly share code, notes, and snippets.

@spro
Created July 18, 2020 19:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save spro/4b29bf0873fe62f6d093676320db784e to your computer and use it in GitHub Desktop.
Save spro/4b29bf0873fe62f6d093676320db784e to your computer and use it in GitHub Desktop.
class User(Model):
name: str
email: str
@to_one
def best_friend(self) -> User: pass
@to_many
def following(self) -> List[User]: pass
@reverse(following)
def followers(self) -> List[User]: pass
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment