Skip to content

Instantly share code, notes, and snippets.

View shey's full-sized avatar

Sheheryar Sewani shey

View GitHub Profile
@shey
shey / mixins.py
Created July 9, 2022 18:11 — forked from lu911/mixins.py
SQLAlchemy Mixins
# -*- coding:utf-8 -*-
from flask import abort
from datetime import datetime
from project.ext import db
class IdMixin(object):
"""
Provides the :attr:`id` primary key column
@shey
shey / bank.py
Created August 10, 2010 02:31 — forked from jessemiller/bank.py
Refactoring buliders using python dicts
class Account():
def __init__(self):
self.balance = 0
self.currency = 'CAD'
self.overdraft = False
def make_deposit(self, amount):
"""imagine a boat load of business logic that would make this useful"""
pass