iparsestrategy¶
Parse Strategy Interface
        
IParseStrategy            (Protocol)
        
  
      dataclass
  
¶
    Parse Strategy Interface.
Source code in oteapi/interfaces/iparsestrategy.py
          @dataclass  # type: ignore[misc]
@runtime_checkable
class IParseStrategy(Protocol):
    """Parse Strategy Interface."""
    resource_config: "ResourceConfig"
    def parse(self, session: "Optional[Dict[str, Any]]" = None) -> "Dict[str, Any]":
        """Execute the strategy.
        Parameters:
            session: A session-specific dictionary context.
        Returns:
            Dictionary of key/value-pairs to be stored in the sessions-specific
            dictionary context.
        """
    def initialize(
        self, session: "Optional[Dict[str, Any]]" = None
    ) -> "Dict[str, Any]":
        """Initialize data class.
        This method will be called through the `/initialize` endpoint of the OTE-API
        Services.
        Parameters:
            session: A session-specific dictionary context.
        Returns:
            Dictionary of key/value-pairs to be stored in the sessions-specific
            dictionary context.
        """
initialize(self, session=None)
¶
    Initialize data class.
This method will be called through the /initialize endpoint of the OTE-API
Services.
Parameters:
| Name | Type | Description | Default | 
|---|---|---|---|
session | 
        Optional[Dict[str, Any]] | 
        A session-specific dictionary context.  | 
        None | 
      
Returns:
| Type | Description | 
|---|---|
Dict[str, Any] | 
      Dictionary of key/value-pairs to be stored in the sessions-specific dictionary context.  | 
    
Source code in oteapi/interfaces/iparsestrategy.py
          def initialize(
    self, session: "Optional[Dict[str, Any]]" = None
) -> "Dict[str, Any]":
    """Initialize data class.
    This method will be called through the `/initialize` endpoint of the OTE-API
    Services.
    Parameters:
        session: A session-specific dictionary context.
    Returns:
        Dictionary of key/value-pairs to be stored in the sessions-specific
        dictionary context.
    """
parse(self, session=None)
¶
    Execute the strategy.
Parameters:
| Name | Type | Description | Default | 
|---|---|---|---|
session | 
        Optional[Dict[str, Any]] | 
        A session-specific dictionary context.  | 
        None | 
      
Returns:
| Type | Description | 
|---|---|
Dict[str, Any] | 
      Dictionary of key/value-pairs to be stored in the sessions-specific dictionary context.  | 
    
Source code in oteapi/interfaces/iparsestrategy.py
          def parse(self, session: "Optional[Dict[str, Any]]" = None) -> "Dict[str, Any]":
    """Execute the strategy.
    Parameters:
        session: A session-specific dictionary context.
    Returns:
        Dictionary of key/value-pairs to be stored in the sessions-specific
        dictionary context.
    """