sanmar_sdk.ftp.legacy ===================== .. py:module:: sanmar_sdk.ftp.legacy .. autoapi-nested-parse:: SanMar's older product text files. These predate the SDL and EPDD files and carry less: no images, no display color names. SanMar still refreshes them in ``SanMarPDD``, and they still carry GTINs. - ``sanmar_pdd.txt`` (pipe-delimited) and ``Catalog.txt`` (tab-delimited) list the catalog, one row per style, color and size, with the same columns under different names. - ``sanmar_saleItems.txt`` (pipe-delimited) lists what is on sale, with sale prices and dates. SanMar no longer offers dozens pricing; its columns here show the piece price, and are not read. Attributes ---------- .. autoapisummary:: sanmar_sdk.ftp.legacy.PDD_COLUMNS sanmar_sdk.ftp.legacy.CATALOG_TXT_COLUMNS sanmar_sdk.ftp.legacy.SALE_ITEM_COLUMNS Classes ------- .. autoapisummary:: sanmar_sdk.ftp.legacy.TextFileRecord sanmar_sdk.ftp.legacy.TextFileProduct sanmar_sdk.ftp.legacy.SaleItem Functions --------- .. autoapisummary:: sanmar_sdk.ftp.legacy.read_pdd sanmar_sdk.ftp.legacy.read_catalog_txt sanmar_sdk.ftp.legacy.read_sale_items Module Contents --------------- .. py:data:: PDD_COLUMNS :value: ('inventory_key', 'catalog_no', 'mill', 'mill_style_no', 'colorcat', 'catalog_color', 'size',... ``sanmar_pdd.txt``, as SanMar's server writes it. .. py:data:: CATALOG_TXT_COLUMNS :value: ('inventory_key', 'catalog_no', 'mill', 'mill_style#', 'colorcat', 'catalog_color', 'size',... the pdd columns, with ``MILL STYLE#`` and ``INDEX`` for two of them. :type: ``Catalog.txt`` .. py:data:: SALE_ITEM_COLUMNS :value: ('inventory_key', 'catalog_no', 'mill', 'mill_style_no', 'colorcat', 'catalog_color', 'size',... ``sanmar_saleItems.txt``, as SanMar's server writes it. .. py:class:: TextFileRecord(/, **data: Any) Bases: :py:obj:`sanmar_sdk.base.Record` The columns SanMar's older product text files share. .. py:attribute:: inventory_key :type: int .. py:attribute:: size_index :type: int :value: None .. py:attribute:: style :type: str :value: None The style number, as printed in SanMar's catalog. .. py:attribute:: catalog_color :type: str The catalog (mainframe) color, which web services and orders expect. .. py:attribute:: size :type: str .. py:attribute:: brand :type: str | None :value: None .. py:attribute:: mill_style :type: str | None :value: None The manufacturer's own style number. .. py:attribute:: description :type: str | None :value: None .. py:attribute:: extended_description :type: str | None :value: None .. py:attribute:: case_quantity :type: int | None :value: None .. py:attribute:: weight :type: decimal.Decimal | None :value: None Approximate weight per piece in pounds. .. py:attribute:: size_type :type: str | None :value: None SanMar's internal size code. .. py:attribute:: gtin :type: str | None :value: None .. py:class:: TextFileProduct(/, **data: Any) Bases: :py:obj:`TextFileRecord` One style, color and size from ``sanmar_pdd.txt`` or ``Catalog.txt``. .. py:attribute:: piece_price :type: sanmar_sdk.base.Price :value: None .. py:attribute:: case_price :type: sanmar_sdk.base.Price :value: None .. py:class:: SaleItem(/, **data: Any) Bases: :py:obj:`TextFileRecord` One style, color and size on sale, from ``sanmar_saleItems.txt``. .. py:attribute:: piece_sale_price :type: sanmar_sdk.base.Price :value: None .. py:attribute:: case_sale_price :type: sanmar_sdk.base.Price :value: None .. py:attribute:: sale_start_date :type: sanmar_sdk.base.SanMarDate | None :value: None .. py:attribute:: sale_end_date :type: sanmar_sdk.base.SanMarDate | None :value: None .. py:function:: read_pdd(source: sanmar_sdk.ftp.readers.Source, *, encoding: str = 'utf-8-sig') -> collections.abc.Iterator[TextFileProduct] Stream ``sanmar_pdd.txt``, one product at a time. .. py:function:: read_catalog_txt(source: sanmar_sdk.ftp.readers.Source, *, encoding: str = 'utf-8-sig') -> collections.abc.Iterator[TextFileProduct] Stream ``Catalog.txt``, one product at a time. .. py:function:: read_sale_items(source: sanmar_sdk.ftp.readers.Source, *, encoding: str = 'utf-8-sig') -> collections.abc.Iterator[SaleItem] Stream ``sanmar_saleItems.txt``, one sale item at a time.