parameters: (self)
return_statement: return key.encode("utf8")
docstring: Gets the signing key, creating it if necessary.
docstring_summary: Gets the signing key, creating it if necessary.
docstring_tokens: Gets the signing key creating it if necessary .
function: def get_key(self):
          """Gets the signing key, creating it if necessary."""
          if self.session is None:
              key = self.key
              assert self.key is not None, "You need to specify a signing key"
          else:
              key = self.session.get("_signature_key")
              if key is None:
                  key = str(uuid.uuid1())
                  self.session["_signature_key"] = key
          return key.encode("utf8")
function_tokens: def get_key ( self ) : if self . session is None : key = self . key assert self . key is not None , "You need to specify a signing key" else : key = self . session . get ( "_signature_key" ) if key is None : key = str ( uuid . uuid1 ( ) ) self . session [ "_signature_key" ] = key return key . encode ( "utf8" )