Skip to content

Commit

Permalink
compose the base handler class.
Browse files Browse the repository at this point in the history
  • Loading branch information
liwei-lai committed Oct 6, 2012
1 parent 8daef6f commit 7634f70
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.pyc
*~
43 changes: 43 additions & 0 deletions pypw/handler.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# -*- coding:utf-8 -*-
"""
pypw.handler
~~~~~~~~~~~~
Implements the actually handling object for pypw.
:copyright: (c) 2012 by Jason Lai.
:license: BSD, see LICENSE for more details.
"""

import logging


class Handler(object):
"""
Handlers control and manage the infomations of user.
"""

def __init__(self):
# Initialize Log
self.log = logging.getLogger('pypw')

def initialize(self, cipher):
"""
validate the cipher and load the data from outside file.
"""
raise NotImplementedError

def write(self):
"""
encrypt the infomations and dumps into outside file.
"""
raise NotImplementedError

def add_item(group, item, value, update=False):
raise NotImplementedError

@property
def items(self):
raise NotImplementedError


0 comments on commit 7634f70

Please sign in to comment.