sanmar_sdk.ftp.catalog ====================== .. py:module:: sanmar_sdk.ftp.catalog .. autoapi-nested-parse:: SanMar's product catalog files. - ``SanMar_SDL_N.csv`` (the SanMar Data Library) has one row per style, color and size, with descriptions, prices, image links and GTINs, but no inventory. Its ``_DI`` variant has the same columns. SanMar's guides call SDL_N and EPDD its main product files, and point to SDL_N as the source of catalog colors for web services and orders. - ``SanMar_EPDD.csv`` has the same columns plus ``QTY``, the stock across all warehouses. A style listed under several categories appears once per category, so unique keys repeat. - The SanMarPI files (bulk, delta, brand and category) are written on request by the product information web service, with a slightly different set of columns. All of them are comma-delimited with a header row, and all are read one row at a time. Attributes ---------- .. autoapisummary:: sanmar_sdk.ftp.catalog.SDL_COLUMNS sanmar_sdk.ftp.catalog.EPDD_COLUMNS sanmar_sdk.ftp.catalog.PRODUCT_INFORMATION_COLUMNS Classes ------- .. autoapisummary:: sanmar_sdk.ftp.catalog.ProductRecord sanmar_sdk.ftp.catalog.CatalogProduct sanmar_sdk.ftp.catalog.ProductInformation Functions --------- .. autoapisummary:: sanmar_sdk.ftp.catalog.read_catalog sanmar_sdk.ftp.catalog.read_extended_catalog sanmar_sdk.ftp.catalog.read_product_information Module Contents --------------- .. py:data:: SDL_COLUMNS :value: ('unique_key', 'product_title', 'product_description', 'style#', 'available_sizes',... ``SanMar_SDL_N.csv``, as SanMar's server writes it. The FTP Integration Guide v23.6 spells a few of these differently (``COMPANION_STYLES``, ``PRODUCT_MEASUREMENT``); the file's own header is followed here. .. py:data:: EPDD_COLUMNS :value: ('unique_key', 'product_title', 'product_description', 'style#', 'available_sizes',... ``SanMar_EPDD.csv``, as SanMar's server writes it. Like SDL_N with ``QTY`` after ``SIZE``, except that its model and flat image columns drop the ``_URL`` suffix SDL_N's have. .. py:data:: PRODUCT_INFORMATION_COLUMNS :value: ('unique_key', 'product_title', 'product_description', 'style#', 'available_sizes',... The SanMarPI bulk, delta, brand and category files, per the Web Services Integration Guide v24.6 and as SanMar's server writes them. .. py:class:: ProductRecord(/, **data: Any) Bases: :py:obj:`sanmar_sdk.base.Record` The columns every SanMar product file shares. .. py:attribute:: unique_key :type: str SanMar's identifier for this style, color and size, and the PromoStandards part id. .. py:attribute:: style :type: str :value: None .. py:attribute:: catalog_color :type: str :value: None The catalog (mainframe) color, which web services and orders expect. .. py:attribute:: color_name :type: str | None :value: None The full color name, for display only. .. py:attribute:: size :type: str .. py:attribute:: inventory_key :type: int .. py:attribute:: size_index :type: int .. py:attribute:: title :type: str | None :value: None .. py:attribute:: description :type: str | None :value: None .. py:attribute:: brand :type: str | None :value: None .. py:attribute:: status :type: str | None :value: None Coming Soon, New, Regular, or Discontinued. Coming Soon rows may be incomplete. .. py:attribute:: available_sizes :type: str | None :value: None .. py:attribute:: price_text :type: str | None :value: None .. py:attribute:: piece_weight :type: decimal.Decimal | None :value: None Approximate weight per piece in pounds. .. py:attribute:: piece_price :type: sanmar_sdk.base.Price :value: None The price per piece for five pieces or fewer of one style and color. .. py:attribute:: case_price :type: sanmar_sdk.base.Price :value: None The price per piece when buying by the case. .. py:attribute:: case_size :type: int | None :value: None .. py:attribute:: map_price :type: sanmar_sdk.base.Price :value: None The minimum advertised price. .. py:attribute:: brand_logo_image :type: str | None :value: None .. py:attribute:: thumbnail_image :type: str | None :value: None .. py:attribute:: color_swatch_image :type: str | None :value: None .. py:attribute:: product_image :type: str | None :value: None .. py:attribute:: spec_sheet :type: str | None :value: None .. py:attribute:: color_square_image :type: str | None :value: None .. py:attribute:: color_product_image :type: str | None :value: None .. py:attribute:: color_product_image_thumbnail :type: str | None :value: None .. py:class:: CatalogProduct(/, **data: Any) Bases: :py:obj:`ProductRecord` One style, color and size from ``SanMar_SDL_N.csv`` or ``SanMar_EPDD.csv``. .. py:attribute:: quantity :type: int | None :value: None Stock across all warehouses, capped by SanMar. Only the EPDD file has it. .. py:attribute:: category :type: str | None :value: None The category. In SDL files this holds every category, separated by semicolons. .. py:attribute:: subcategory :type: str | None :value: None .. py:attribute:: suggested_price :type: sanmar_sdk.base.Price :value: None .. py:attribute:: msrp :type: sanmar_sdk.base.Price :value: None .. py:attribute:: companion_styles :type: str | None :value: None .. py:attribute:: front_model_image_url :type: str | None :value: None .. py:attribute:: back_model_image_url :type: str | None :value: None .. py:attribute:: front_flat_image_url :type: str | None :value: None .. py:attribute:: back_flat_image_url :type: str | None :value: None .. py:attribute:: product_measurements :type: str | None :value: None .. py:attribute:: pms_color :type: str | None :value: None The Pantone (PMS) color. SanMar says it does not stand in for the product color. .. py:attribute:: gtin :type: str | None :value: None .. py:attribute:: decoration_spec_sheet :type: str | None :value: None .. py:class:: ProductInformation(/, **data: Any) Bases: :py:obj:`ProductRecord` One style, color and size from a SanMarPI file. .. py:attribute:: category :type: str | None :value: None .. py:attribute:: keywords :type: sanmar_sdk.base.CommaSeparated :value: None .. 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:attribute:: price_code :type: str | None :value: None The suggested retail pricing code. A/P is 50%, B/Q 45%, C/R 40%, D/S 35%, E/T 30%. .. py:attribute:: front_flat :type: str | None :value: None .. py:attribute:: back_flat :type: str | None :value: None .. py:attribute:: front_model :type: str | None :value: None .. py:attribute:: back_model :type: str | None :value: None .. py:attribute:: side_model :type: str | None :value: None .. py:attribute:: three_q_model :type: str | None :value: None .. py:function:: read_catalog(source: sanmar_sdk.ftp.readers.Source, *, encoding: str = 'utf-8-sig') -> collections.abc.Iterator[CatalogProduct] Stream ``SanMar_SDL_N.csv`` (or ``SanMar_SDL_DI.csv``), one product at a time. .. py:function:: read_extended_catalog(source: sanmar_sdk.ftp.readers.Source, *, encoding: str = 'utf-8-sig') -> collections.abc.Iterator[CatalogProduct] Stream ``SanMar_EPDD.csv``, one product at a time, with total stock. .. py:function:: read_product_information(source: sanmar_sdk.ftp.readers.Source, *, encoding: str = 'utf-8-sig') -> collections.abc.Iterator[ProductInformation] Stream a SanMarPI bulk, delta, brand or category file, one product at a time.