Skip to content

Instantly share code, notes, and snippets.

@mwcampbell
Created July 28, 2011 15:55
Show Gist options
  • Save mwcampbell/1111809 to your computer and use it in GitHub Desktop.
Save mwcampbell/1111809 to your computer and use it in GitHub Desktop.
models.py
class User(Base):
__tablename__ = "users"
id = Column(Integer, primary_key=True)
username = Column(String(32))
# ...
users = Collection(DBSession, User, "username")
root = {"users": users}
# or root = users
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment