sanmar_sdk.ftp.legacy

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

PDD_COLUMNS

sanmar_pdd.txt, as SanMar's server writes it.

CATALOG_TXT_COLUMNS

the pdd columns, with MILL STYLE# and INDEX for two of them.

SALE_ITEM_COLUMNS

sanmar_saleItems.txt, as SanMar's server writes it.

Classes

TextFileRecord

The columns SanMar's older product text files share.

TextFileProduct

One style, color and size from sanmar_pdd.txt or Catalog.txt.

SaleItem

One style, color and size on sale, from sanmar_saleItems.txt.

Functions

read_pdd(→ collections.abc.Iterator[TextFileProduct])

Stream sanmar_pdd.txt, one product at a time.

read_catalog_txt(...)

Stream Catalog.txt, one product at a time.

read_sale_items(→ collections.abc.Iterator[SaleItem])

Stream sanmar_saleItems.txt, one sale item at a time.

Module Contents

sanmar_sdk.ftp.legacy.PDD_COLUMNS = ('inventory_key', 'catalog_no', 'mill', 'mill_style_no', 'colorcat', 'catalog_color', 'size',...[source]

sanmar_pdd.txt, as SanMar’s server writes it.

sanmar_sdk.ftp.legacy.CATALOG_TXT_COLUMNS = ('inventory_key', 'catalog_no', 'mill', 'mill_style#', 'colorcat', 'catalog_color', 'size',...[source]

the pdd columns, with MILL STYLE# and INDEX for two of them.

Type:

Catalog.txt

sanmar_sdk.ftp.legacy.SALE_ITEM_COLUMNS = ('inventory_key', 'catalog_no', 'mill', 'mill_style_no', 'colorcat', 'catalog_color', 'size',...[source]

sanmar_saleItems.txt, as SanMar’s server writes it.

class sanmar_sdk.ftp.legacy.TextFileRecord(/, **data: Any)[source]

Bases: sanmar_sdk.base.Record

The columns SanMar’s older product text files share.

inventory_key: int[source]
size_index: int = None[source]
style: str = None[source]

The style number, as printed in SanMar’s catalog.

catalog_color: str[source]

The catalog (mainframe) color, which web services and orders expect.

size: str[source]
brand: str | None = None[source]
mill_style: str | None = None[source]

The manufacturer’s own style number.

description: str | None = None[source]
extended_description: str | None = None[source]
case_quantity: int | None = None[source]
weight: decimal.Decimal | None = None[source]

Approximate weight per piece in pounds.

size_type: str | None = None[source]

SanMar’s internal size code.

gtin: str | None = None[source]
class sanmar_sdk.ftp.legacy.TextFileProduct(/, **data: Any)[source]

Bases: TextFileRecord

One style, color and size from sanmar_pdd.txt or Catalog.txt.

piece_price: sanmar_sdk.base.Price = None[source]
case_price: sanmar_sdk.base.Price = None[source]
class sanmar_sdk.ftp.legacy.SaleItem(/, **data: Any)[source]

Bases: TextFileRecord

One style, color and size on sale, from sanmar_saleItems.txt.

piece_sale_price: sanmar_sdk.base.Price = None[source]
case_sale_price: sanmar_sdk.base.Price = None[source]
sale_start_date: sanmar_sdk.base.SanMarDate | None = None[source]
sale_end_date: sanmar_sdk.base.SanMarDate | None = None[source]
sanmar_sdk.ftp.legacy.read_pdd(source: sanmar_sdk.ftp.readers.Source, *, encoding: str = 'utf-8-sig') → collections.abc.Iterator[TextFileProduct][source]

Stream sanmar_pdd.txt, one product at a time.

sanmar_sdk.ftp.legacy.read_catalog_txt(source: sanmar_sdk.ftp.readers.Source, *, encoding: str = 'utf-8-sig') → collections.abc.Iterator[TextFileProduct][source]

Stream Catalog.txt, one product at a time.

sanmar_sdk.ftp.legacy.read_sale_items(source: sanmar_sdk.ftp.readers.Source, *, encoding: str = 'utf-8-sig') → collections.abc.Iterator[SaleItem][source]

Stream sanmar_saleItems.txt, one sale item at a time.