Guest User

Untitled

a guest
Nov 15th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. @staticmethod
  2. def insert(key, data, d1=None, d2=None):
  3. datenow = str(date.today())
  4. with Vedis(db_file) as db:
  5. d = json.dumps({datenow: {data: {'e1': d1, 'e2':
  6. d2}}})
  7. db[user] = d
  8.  
  9. @staticmethod
  10. def get_hour(key):
  11. with Vedis(db_file) as db:
  12. return db[user]
Add Comment
Please, Sign In to add comment