(parsing_canonical_form, algorithm)
return h.hexdigest()
Returns a string represening a fingerprint/hash of the parsing canonical
    form of a schema.

    For more details on the fingerprint, see here:
    https://avro.apache.org/docs/current/spec.html#schema_fingerprints
Returns a string represening a fingerprint/hash of the parsing canonical
    form of a schema.
Returns a string represening a fingerprint / hash of the parsing canonical form of a schema .
def fingerprint(parsing_canonical_form, algorithm):
    """Returns a string represening a fingerprint/hash of the parsing canonical
    form of a schema.

    For more details on the fingerprint, see here:
    https://avro.apache.org/docs/current/spec.html#schema_fingerprints
    """
    if algorithm not in FINGERPRINT_ALGORITHMS:
        raise ValueError(
            f"Unknown schema fingerprint algorithm {algorithm}. "
            + f"Valid values include: {FINGERPRINT_ALGORITHMS}"
        )

    # Fix Java names
    algorithm = JAVA_FINGERPRINT_MAPPING.get(algorithm, algorithm)

    if algorithm == RABIN_64:
        return rabin_fingerprint(parsing_canonical_form.encode())

    h = hashlib.new(algorithm, parsing_canonical_form.encode())
    return h.hexdigest()
def fingerprint ( parsing_canonical_form , algorithm ) : if algorithm not in FINGERPRINT_ALGORITHMS : raise ValueError ( f"Unknown schema fingerprint algorithm {algorithm}. " + f"Valid values include: {FINGERPRINT_ALGORITHMS}" ) # Fix Java names algorithm = JAVA_FINGERPRINT_MAPPING . get ( algorithm , algorithm ) if algorithm == RABIN_64 : return rabin_fingerprint ( parsing_canonical_form . encode ( ) ) h = hashlib . new ( algorithm , parsing_canonical_form . encode ( ) ) return h . hexdigest ( )