# Path: passwordtype.py
# class PasswordType(types.TypeDecorator):
# 
#     impl = types.VARCHAR
#     python_type = Password
# 
#     def process_bind_param(self, value, dialect):
#         if isinstance(value, Password):
#             r = value.hashed
#         elif isinstance(value, basestring):
#             r = hashpassword(value)
#         else:
#             raise RuntimeError('Unable to process bind parameter: %s.' % (value, ))
#         return encode(r)
# 
#     def process_result_value(self, value, dialect):
#         if value is not None:
#             return Password(value)


import argparse
import datetime as dt
import os
import sys
import urllib
import random
import string
import re
from sqlalchemy import (Boolean, Column, Date, DateTime, ForeignKey, Integer,
                        String, Text)
from sqlalchemy.orm import backref, relationship
from sqlalchemy.ext.declarative import declarative_base
from passwordtype import PasswordType
        from library import app
    from library import app, db
    from library import db
    from sqlalchemy.schema import CreateTable
                            email='jjohanson@bigpimpn.net',
                            contact='phone',
                            phone='5555555555',
                            times='M-Th 12-2 pm'),
                 ])
    rl1 = ReadingList(recdate=dt.date(2015,10,1),
                      ISBN='9780394800301',
                      book='ABCs',
                      author='Dr. Suess',
                      comment='best seller',
                      category='Mystery')
    rl2 = ReadingList(recdate=dt.date(2015,10,2),
                      ISBN=' 9781402750656',
                      book='Night Before Christmas',
                      author='Santa',
                      comment='find holday fun',
                      category='Sci-fi')
    fred.readinglist.append(rl1)
    fred.readinglist.append(rl2)
    session.add(fred)

    loremipsum = '''Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.'''
    loreminterests = 'long walks on the beach, hobbies, interests, model cars, real python, meatballs, 80s jock jams, hangin with mr cooper, drawing with chalk, bird watching, trying to make long interests lists, trying not to run out of ideas and failing'

    session.add(Staff(username='ernie',
                         password='ernie',
                         f_name='Ernie',
                         l_name='Ernieston',
                         phonenumber=3333333333,
                         emailaddress='ernie@test.com',

# Path: passwordtype.py
# class PasswordType(types.TypeDecorator):
# 
#     impl = types.VARCHAR
#     python_type = Password
# 
#     def process_bind_param(self, value, dialect):
#         if isinstance(value, Password):
#             r = value.hashed
#         elif isinstance(value, basestring):
#             r = hashpassword(value)
#         else:
#             raise RuntimeError('Unable to process bind parameter: %s.' % (value, ))
#         return encode(r)
# 
#     def process_result_value(self, value, dialect):
#         if value is not None:
#             return Password(value)


# Path: models.py
import argparse
import datetime as dt
import os
import sys
import urllib
import random
import string
import re
from sqlalchemy import (Boolean, Column, Date, DateTime, ForeignKey, Integer,
                        String, Text)
from sqlalchemy.orm import backref, relationship
from sqlalchemy.ext.declarative import declarative_base
from passwordtype import PasswordType
        from library import app
    from library import app, db
    from library import db
    from sqlalchemy.schema import CreateTable

                            email='jjohanson@bigpimpn.net',
                            contact='phone',
                            phone='5555555555',
                            times='M-Th 12-2 pm'),
                 ])
    rl1 = ReadingList(recdate=dt.date(2015,10,1),
                      ISBN='9780394800301',
                      book='ABCs',
                      author='Dr. Suess',
                      comment='best seller',
                      category='Mystery')
    rl2 = ReadingList(recdate=dt.date(2015,10,2),
                      ISBN=' 9781402750656',
                      book='Night Before Christmas',
                      author='Santa',
                      comment='find holday fun',
                      category='Sci-fi')
    fred.readinglist.append(rl1)
    fred.readinglist.append(rl2)
    session.add(fred)

    loremipsum = '''Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.'''
    loreminterests = 'long walks on the beach, hobbies, interests, model cars, real python, meatballs, 80s jock jams, hangin with mr cooper, drawing with chalk, bird watching, trying to make long interests lists, trying not to run out of ideas and failing'

    session.add(Staff(username='ernie',
                         password='ernie',
                         f_name='Ernie',
                         l_name='Ernieston',
                         phonenumber=3333333333,
                         emailaddress='ernie@test.com',

                         bio=loremipsum,