Exemplo n.º 1
0
 def _default(self, data):
     try:
         return util.b64e(data.binary)
     except AttributeError:
         pass
     try:
         return int(mktime(data.timetuple()))
     except AttributeError:
         pass
     return str(data)
Exemplo n.º 2
0
Arquivo: auth.py Projeto: rivan/w3fu
 def _new(self, email):
     self.email = email
     self.shortcut = b64e(uuid4().bytes)
Exemplo n.º 3
0
Arquivo: auth.py Projeto: rivan/w3fu
 def _new(self):
     self.id = b64e(uuid4().bytes)
     self.expires = datetime.utcnow() + config.session_ttl
Exemplo n.º 4
0
Arquivo: args.py Projeto: rivan/w3fu
 def _pack(self, value):
     return util.b64e(value.binary)
Exemplo n.º 5
0
 def _dump(self, attr):
     return util.b64e(attr.binary)