ds_provider_tripletex_py_lib.read_info ====================================== .. py:module:: ds_provider_tripletex_py_lib.read_info .. autoapi-nested-parse:: **File:** ``read_info.py`` **Region:** ``ds_provider_tripletex_py_lib/read_info`` Read and field-projection information for Tripletex products. Each :class:`~ds_provider_tripletex_py_lib.enums.TripletexProductName` has a packaged ``assets//read/metadata.json`` declaring ``path``, ``pagination`` (``"date_window"`` if the endpoint has ``dateFrom``/``dateTo``, else ``"offset"``), ``changed_since`` (use Tripletex's ``changedSince`` filter instead of ``versionDigest``/``If-None-Match``), a field selector (``str``, or a one-key ``dict`` for a nested group, e.g. ``{"account": ["id"]}``), and an optional ``explode_columns`` (fields that are a list of objects, needing one row per element rather than in-place flattening). ``_lite`` products reuse a full product's path with fewer fields. Classes ------- .. autoapisummary:: ds_provider_tripletex_py_lib.read_info.ReadInfo Functions --------- .. autoapisummary:: ds_provider_tripletex_py_lib.read_info._load_metadata ds_provider_tripletex_py_lib.read_info.get_read_info Module Contents --------------- .. py:class:: ReadInfo Read information for a single Tripletex product. .. attribute:: path API path segment appended to the linked service host, e.g. ``"ledger/posting"``. .. attribute:: fields Field selector list used to build the ``fields`` query parameter. .. attribute:: changed_since Whether this product supports Tripletex's ``changedSince`` filter (replaces ``versionDigest``/``If-None-Match`` when ``True``). .. attribute:: pagination How ``read()`` requests are paginated for this product. .. attribute:: explode_columns Field names that are a list of objects and should be exploded into one row per element, e.g. ``["bankAccountPresentation"]``. .. py:attribute:: path :type: str .. py:attribute:: fields :type: list[Any] .. py:attribute:: changed_since :type: bool .. py:attribute:: pagination :type: ds_provider_tripletex_py_lib.enums.PaginationKind .. py:attribute:: explode_columns :type: list[str] :value: [] .. py:function:: _load_metadata(product_name: ds_provider_tripletex_py_lib.enums.TripletexProductName, operation: ds_provider_tripletex_py_lib.enums.OperationType) -> dict[str, Any] Read and parse one product's packaged operation metadata. A plain, mechanical file read -- whether a missing file is an error is left to the caller to decide. :param product_name: Tripletex product whose assets to load. :param operation: Operation whose metadata file to load. :returns: Parsed JSON payload. :rtype: dict[str, Any] :raises FileNotFoundError: If the product has no packaged assets for that operation. .. py:function:: get_read_info(product_name: ds_provider_tripletex_py_lib.enums.TripletexProductName) -> ReadInfo Load packaged read metadata for a Tripletex product. Every :class:`TripletexProductName` member must ship read assets, so a missing file is treated the same as a malformed one -- a packaging bug, not a condition to degrade gracefully from. :param product_name: Tripletex product to load. :returns: Read info built from ``assets//read/metadata.json``. :rtype: ReadInfo :raises ValidationError: If the metadata file is missing, or exists but is missing a required key (``path``, ``fields``, ``pagination``, ``changed_since``) or ``pagination`` is not a recognized :class:`PaginationKind` value.