fleche.call =========== .. py:module:: fleche.call Attributes ---------- .. autoapisummary:: fleche.call.AnyCall Classes ------- .. autoapisummary:: fleche.call.Call fleche.call.LazyCall fleche.call.QueryCall Module Contents --------------- .. py:class:: Call Represents a function call, capturing its name, arguments, and keyword arguments. `module` and `version` can be optionally set to be included in the hash of the call. `version` should be a plain integer and monotonically increase. Each different version will completely change the hash of the call, invalidating previously cached results. .. py:attribute:: name :type: str .. py:attribute:: arguments :type: dict[str, Any] .. py:attribute:: metadata :type: dict[str, dict[str, Any]] .. py:attribute:: module :type: str | None :value: None .. py:attribute:: version :type: int | None :value: None .. py:attribute:: code_digest :type: str | None :value: None .. py:attribute:: result :type: Any :value: None .. py:method:: from_call(func, *args, **kwargs) :classmethod: .. py:method:: to_lookup_key() .. py:method:: matches(other: Call | LazyCall) -> bool Check if this call matches another call, treating None as a wildcard in this object. .. py:class:: LazyCall .. py:attribute:: name :type: str .. py:attribute:: _arguments :type: dict[str, Any] .. py:attribute:: _result :type: Any .. py:attribute:: _cache :type: Any .. py:attribute:: metadata :type: dict[str, dict[str, Any]] .. py:attribute:: module :type: str | None :value: None .. py:attribute:: version :type: int | None :value: None .. py:attribute:: code_digest :type: str | None :value: None .. py:property:: arguments .. py:property:: result .. py:method:: to_lookup_key() -> str .. py:method:: fetch() -> Call Reconstruct a full Call object by loading all values from the cache. .. py:method:: __digest__() .. py:class:: QueryCall .. py:attribute:: name :type: StrQueryType :value: None .. py:attribute:: arguments :type: dict[str, AnyQueryType] | None :value: None .. py:attribute:: metadata :type: dict[str, dict[str, StrQueryType]] | None :value: None .. py:attribute:: module :type: str | None :value: None .. py:attribute:: version :type: int | None :value: None .. py:attribute:: code_digest :type: fleche.digest.Digest | None :value: None .. py:attribute:: result :type: AnyQueryType :value: None .. py:method:: from_call(func, *args, **kwargs) :classmethod: .. py:method:: matches(other: Call | LazyCall) -> bool Check if this call matches another call, treating None as a wildcard in this object. .. py:data:: AnyCall