old_contents: # gozerlib/container.py
  #
  #
  
  """ container for bot to bot communication. """
  
  ## gozerlib imports
  
  from gozerlib.gozerevent import GozerEvent
  from simplejson import dumps
  ## basic imports
  
  import hmac
  import uuid
  import time
  import hashlib
  
  ## defines
  
  idattributes = ['createtime', 'origin', 'type', 'idtime', 'payload']
  
  ## functions
  
  def getid(container):
      name = ""
      for attr in idattributes:
          try:
              name += str(container[attr])
          except KeyError:
              pass
      return uuid.uuid3(uuid.NAMESPACE_URL, name).hex
  
  ## classes
  
  class Container(GozerEvent):
  
      def __init__(self, origin=None, payload=None, type="event", key=None):
          GozerEvent.__init__(self)
          self.createtime = time.time()
          self.origin = origin
          self.type = str(type) 
          self.payload = payload
          self.makeid()
          if key:
              self.makehmac(key)
          else:
              self.makehmac(self.id)
  
      def makeid(self):
          self.idtime = time.time()
          self.id = getid(self)
  
      def makehmac(self, key):
          self.hash = "sha512"
          self.hashkey = key
          self.digest = hmac.new(key, dumps(self.payload), hashlib.sha512).hexdigest()
  
new_contents: # gozerlib/container.py
  #
  #
  
  """ container for bot to bot communication. """
  
  ## gozerlib imports
  
  from gozerlib.gozerevent import GozerEvent
  from simplejson import dumps
  ## basic imports
  
  import hmac
  import uuid
  import time
  import hashlib
  
  ## defines
  
  idattributes = ['createtime', 'origin', 'type', 'idtime', 'payload']
  
  ## functions
  
  def getid(container):
      name = ""
      for attr in idattributes:
          try:
              name += str(container[attr])
          except KeyError:
              pass
      return uuid.uuid3(uuid.NAMESPACE_URL, name).hex
  
  ## classes
  
  class Container(GozerEvent):
  
      def __init__(self, origin=None, payload=None, type="event", key=None):
          GozerEvent.__init__(self)
          self.createtime = time.time()
          self.origin = origin
          self.type = str(type) 
          self.payload = payload
          self.makeid()
          if key:
              self.makehmac(key)
          else:
              self.makehmac(self.id)
  
      def makeid(self):
          self.idtime = time.time()
          self.id = getid(self)
  
      def makehmac(self, key):
          self.hash = "sha512"
          self.hashkey = key
          self.digest = hmac.new(key, self.payload, hashlib.sha512).hexdigest()
  
subject: make proper digest