KeyedMixin

class KeyedMixin[source]

Bases: ABC, Generic[P, X]

A mixin for a class that can be hashed and CURIE-encoded.

Attributes Summary

curie

Get a string representing the CURIE.

Methods Summary

get_reference(*args, **kwargs)

Get a CURIE reference using this class's prefix and its hexadecimal representation.

hexdigest(*args, **kwargs)

Get a hex string for the MD5 hash of the pickled key() for this class.

key(*args, **kwargs)

Return a picklable key.

Attributes Documentation

curie

Get a string representing the CURIE.

Methods Documentation

get_reference(*args: ~P, **kwargs: ~P) NormalizedNamableReference[source]

Get a CURIE reference using this class’s prefix and its hexadecimal representation.

hexdigest(*args: ~P, **kwargs: ~P) str[source]

Get a hex string for the MD5 hash of the pickled key() for this class.

abstractmethod key(*args: ~P, **kwargs: ~P) X[source]

Return a picklable key.