parameters: (self)
return_statement: return result.hexdigest()
docstring: Get a unique identifier for this work specification.
  
          Returns:
              hash value
  
          Generate a cryptographic hash of this work specification that is guaranteed to match that of another equivalent
          work specification. The returned string is a 64-character hexadecimal encoded SHA-256 hash digest of the
          serialized WorkSpec.
  
          The definition of equivalence is likely to evolve, but currently means a work spec of the
          same version with the same named elements containing the same operations, dependencies, and parameters, as
          represented in the serialized version of the work specification. Note that this does not include checks on the
          actual contents of input files or anything that does not appear in the work specification directly. Also, the
          hash is lossy, so it is remotely conceivable that two specs could have the same hash. The work specs
          should be compared before making any expensive decisions based on work spec equivalence, such as with hash(workspec).
  
          Element names probably shouldn't be included in the unique identifying information (so that we can optimize out
          duplicated artifacts), but they are. A future API specification may add unique identification to the elements...
docstring_summary: Get a unique identifier for this work specification.
docstring_tokens: Get a unique identifier for this work specification .
function: def uid(self):
          """Get a unique identifier for this work specification.
  
          Returns:
              hash value
  
          Generate a cryptographic hash of this work specification that is guaranteed to match that of another equivalent
          work specification. The returned string is a 64-character hexadecimal encoded SHA-256 hash digest of the
          serialized WorkSpec.
  
          The definition of equivalence is likely to evolve, but currently means a work spec of the
          same version with the same named elements containing the same operations, dependencies, and parameters, as
          represented in the serialized version of the work specification. Note that this does not include checks on the
          actual contents of input files or anything that does not appear in the work specification directly. Also, the
          hash is lossy, so it is remotely conceivable that two specs could have the same hash. The work specs
          should be compared before making any expensive decisions based on work spec equivalence, such as with hash(workspec).
  
          Element names probably shouldn't be included in the unique identifying information (so that we can optimize out
          duplicated artifacts), but they are. A future API specification may add unique identification to the elements...
          """
          # Get an alphanumeric string of the checksum of the serialized work spec. SHA-256 should require about 43 characters
          # of base64 to represent, which seems reasonable. We need to replace some of the base64 characters to make them
          # filesystem friendly, though. Hexadecimal may be more friendly, but would require 64 characters.
          import hashlib
          data = to_utf8(self.serialize())
          result = hashlib.sha256(data)
          return result.hexdigest()
function_tokens: def uid ( self ) : # Get an alphanumeric string of the checksum of the serialized work spec. SHA-256 should require about 43 characters # of base64 to represent, which seems reasonable. We need to replace some of the base64 characters to make them # filesystem friendly, though. Hexadecimal may be more friendly, but would require 64 characters. import hashlib data = to_utf8 ( self . serialize ( ) ) result = hashlib . sha256 ( data ) return result . hexdigest ( )