pyrit.identifiers.Identifiable

pyrit.identifiers.Identifiable#

class Identifiable[source]#

Bases: ABC, Generic[IdentifierT]

Abstract base class for objects that can provide a typed identifier.

Generic over IdentifierT, allowing subclasses to specify their exact identifier type for strong typing support.

Subclasses must implement _build_identifier() to construct their specific identifier. The get_identifier() method is provided and uses lazy building with caching.

__init__()#

Methods

__init__()

get_identifier()

Get the typed identifier for this object.

get_identifier() IdentifierT[source]#

Get the typed identifier for this object. Built lazily on first access.

Returns:

The identifier for this component.

Return type:

IdentifierT