yandex_market_language.models package

Submodules

yandex_market_language.models.base module

yandex_market_language.models.category module

class yandex_market_language.models.category.Category(category_id, name, parent_id=None)[source]

Bases: yandex_market_language.models.abstract.AbstractModel

Category model for shop.

Docs: https://yandex.ru/support/partnermarket/elements/categories.html

category_id
create_dict(**kwargs) → dict[source]

Must be inherited by each child class. Describes the logic for creating a dictionary with data from a model.

create_xml(**kwargs) → xml.etree.ElementTree.Element[source]

Must be inherited by each child class. Describes the logic for creating a xml with data from a model.

static from_xml(el: xml.etree.ElementTree.Element) → yandex_market_language.models.category.Category[source]

Must be inherited by each child class. Describes the logic for creating a model from an xml element.

name
parent_id

yandex_market_language.models.currency module

class yandex_market_language.models.currency.Currency(currency, rate, plus=None)[source]

Bases: yandex_market_language.models.abstract.AbstractModel

Currency model. Used to create a list of shop currency rates.

Docs: https://yandex.ru/support/partnermarket/elements/currencies.html

create_dict(**kwargs) → dict[source]

Must be inherited by each child class. Describes the logic for creating a dictionary with data from a model.

create_xml(**kwargs) → xml.etree.ElementTree.Element[source]

Must be inherited by each child class. Describes the logic for creating a xml with data from a model.

currency
static from_xml(el: xml.etree.ElementTree.Element) → yandex_market_language.models.currency.Currency[source]

Must be inherited by each child class. Describes the logic for creating a model from an xml element.

plus
rate

yandex_market_language.models.feed module

class yandex_market_language.models.feed.Feed(shop: yandex_market_language.models.shop.Shop, date: None.datetime.date = None)[source]

Bases: yandex_market_language.models.abstract.AbstractModel

YML Feed model.

Docs: https://yandex.ru/support/partnermarket/export/yml.html

create_dict(**kwargs) → dict[source]

Must be inherited by each child class. Describes the logic for creating a dictionary with data from a model.

create_xml(**kwargs) → xml.etree.ElementTree.Element[source]

Must be inherited by each child class. Describes the logic for creating a xml with data from a model.

date
static from_xml(el: xml.etree.ElementTree.Element) → yandex_market_language.models.feed.Feed[source]

Must be inherited by each child class. Describes the logic for creating a model from an xml element.

shop

yandex_market_language.models.offers module

class yandex_market_language.models.offers.AbstractBookOffer(name: str, publisher: str, age: yandex_market_language.models.age.Age, isbn: str = None, author: str = None, series: str = None, year=None, volume=None, part=None, language: str = None, table_of_contents=None, **kwargs)[source]

Bases: yandex_market_language.models.fields.year.YearField, yandex_market_language.models.offers.AbstractOffer, abc.ABC

Abstract book offer for book & audio book offer types.

age
author
barcodes
bid
category_id
condition
create_dict(**kwargs) → dict[source]

Must be inherited by each child class. Describes the logic for creating a dictionary with data from a model.

create_xml(**kwargs) → xml.etree.ElementTree.Element[source]

Must be inherited by each child class. Describes the logic for creating a xml with data from a model.

credit_template_id
currency
description
dimensions
static from_xml(offer_el: xml.etree.ElementTree.Element, **mapping) → dict[source]

Abstract method for parsing the xml element into a dictionary.

isbn
language
name
offer_id
old_price
part
pictures
price
publisher
sales_notes
series
supplier
table_of_contents
url
vendor
vendor_code
volume
class yandex_market_language.models.offers.AbstractOffer(offer_id, url, price: yandex_market_language.models.price.Price, currency: str, category_id, vendor=None, vendor_code=None, bid=None, cbid=None, old_price=None, enable_auto_discounts=None, pictures: List[str] = None, supplier=None, delivery=True, pickup=True, delivery_options: List[yandex_market_language.models.option.Option] = None, pickup_options: List[yandex_market_language.models.option.Option] = None, store=None, description: str = None, sales_notes: str = None, min_quantity=1, manufacturer_warranty=None, country_of_origin=None, adult=None, barcodes: List[str] = None, parameters: List[yandex_market_language.models.parameter.Parameter] = None, condition: yandex_market_language.models.condition.Condition = None, credit_template_id: str = None, expiry=None, weight=None, dimensions: yandex_market_language.models.dimensions.Dimensions = None, downloadable=None, available=None, age: yandex_market_language.models.age.Age = None, group_id=None)[source]

Bases: yandex_market_language.models.fields.enable_auto_discounts.EnableAutoDiscountField, yandex_market_language.models.fields.options.DeliveryOptionsField, yandex_market_language.models.fields.options.PickupOptionsField, yandex_market_language.models.abstract.AbstractModel, abc.ABC

Abstract offer model for all other offer models.

adult
age
available
barcodes
bid
category_id
cbid
condition
create_dict(**kwargs) → dict[source]

Must be inherited by each child class. Describes the logic for creating a dictionary with data from a model.

create_xml(**kwargs) → xml.etree.ElementTree.Element[source]

Must be inherited by each child class. Describes the logic for creating a xml with data from a model.

credit_template_id
currency
delivery
description
dimensions
downloadable
expiry
static from_xml(offer_el: xml.etree.ElementTree.Element, **mapping) → dict[source]

Abstract method for parsing the xml element into a dictionary.

group_id
manufacturer_warranty
min_quantity
offer_id
old_price
parameters
pickup
pictures
price
sales_notes
store
supplier
url
vendor
vendor_code
weight
class yandex_market_language.models.offers.AlcoholOffer(name: str, vendor: str, barcodes: List[str], parameters: List[yandex_market_language.models.parameter.Parameter], **kwargs)[source]

Bases: yandex_market_language.models.offers.AbstractOffer

Alcohol offer.

Docs: https://yandex.ru/support/partnermarket/export/alcohol.html

age
barcodes
bid
category_id
condition
create_dict(**kwargs) → dict[source]

Must be inherited by each child class. Describes the logic for creating a dictionary with data from a model.

create_xml(**kwargs) → xml.etree.ElementTree.Element[source]

Must be inherited by each child class. Describes the logic for creating a xml with data from a model.

credit_template_id
currency
description
dimensions
static from_xml(offer_el: xml.etree.ElementTree.Element, **mapping) → yandex_market_language.models.offers.AlcoholOffer[source]

Abstract method for parsing the xml element into a dictionary.

name
offer_id
old_price
parameters
pictures
price
sales_notes
supplier
url
vendor
vendor_code
class yandex_market_language.models.offers.ArbitraryOffer(model: str, vendor: str, type_prefix: str = None, **kwargs)[source]

Bases: yandex_market_language.models.offers.AbstractOffer

Arbitrary offer. In an arbitrary type, the manufacturer, type and name of the product must be indicated in separate elements - model, vendor & typePrefix.

Yandex.Market docs: https://yandex.ru/support/partnermarket/export/vendor-model.html

age
barcodes
bid
category_id
condition
create_dict(**kwargs) → dict[source]

Must be inherited by each child class. Describes the logic for creating a dictionary with data from a model.

create_xml(**kwargs) → xml.etree.ElementTree.Element[source]

Must be inherited by each child class. Describes the logic for creating a xml with data from a model.

credit_template_id
currency
description
dimensions
static from_xml(offer_el: xml.etree.ElementTree.Element, **mapping) → yandex_market_language.models.offers.ArbitraryOffer[source]

Abstract method for parsing the xml element into a dictionary.

model
offer_id
old_price
pictures
price
sales_notes
supplier
type_prefix
url
vendor
vendor_code
class yandex_market_language.models.offers.AudioBookOffer(performed_by: str = None, performance_type: str = None, storage: str = None, audio_format: str = None, recording_length: str = None, **kwargs)[source]

Bases: yandex_market_language.models.offers.AbstractBookOffer

Audio book offer.

Docs: https://yandex.ru/support/partnermarket/export/audiobooks.html

age
audio_format
author
barcodes
bid
category_id
condition
create_dict(**kwargs) → dict[source]

Must be inherited by each child class. Describes the logic for creating a dictionary with data from a model.

create_xml(**kwargs) → xml.etree.ElementTree.Element[source]

Must be inherited by each child class. Describes the logic for creating a xml with data from a model.

credit_template_id
currency
description
dimensions
static from_xml(offer_el: xml.etree.ElementTree.Element, **mapping) → yandex_market_language.models.offers.AudioBookOffer[source]

Abstract method for parsing the xml element into a dictionary.

isbn
language
name
offer_id
old_price
performance_type
performed_by
pictures
price
publisher
recording_length
sales_notes
series
storage
supplier
table_of_contents
url
vendor
vendor_code
class yandex_market_language.models.offers.BookOffer(binding=None, page_extent=None, **kwargs)[source]

Bases: yandex_market_language.models.offers.AbstractBookOffer

Special offer type for books.

Yandex.Market docs: https://yandex.ru/support/partnermarket/export/books.html

age
author
barcodes
bid
binding
category_id
condition
create_dict(**kwargs) → dict[source]

Must be inherited by each child class. Describes the logic for creating a dictionary with data from a model.

create_xml(**kwargs) → xml.etree.ElementTree.Element[source]

Must be inherited by each child class. Describes the logic for creating a xml with data from a model.

credit_template_id
currency
description
dimensions
static from_xml(offer_el: xml.etree.ElementTree.Element, **mapping) → yandex_market_language.models.offers.BookOffer[source]

Abstract method for parsing the xml element into a dictionary.

isbn
language
name
offer_id
old_price
page_extent
pictures
price
publisher
sales_notes
series
supplier
table_of_contents
url
vendor
vendor_code
class yandex_market_language.models.offers.EventTicketOffer(name: str, place: str, date, hall: str = None, hall_part: str = None, is_premiere=None, is_kids=None, **kwargs)[source]

Bases: yandex_market_language.models.offers.AbstractOffer

EventTicket offer.

Docs: https://yandex.ru/support/partnermarket/export/event-tickets.html

age
barcodes
bid
category_id
condition
create_dict(**kwargs) → dict[source]

Must be inherited by each child class. Describes the logic for creating a dictionary with data from a model.

create_xml(**kwargs) → xml.etree.ElementTree.Element[source]

Must be inherited by each child class. Describes the logic for creating a xml with data from a model.

credit_template_id
currency
date
description
dimensions
static from_xml(offer_el: xml.etree.ElementTree.Element, **mapping) → yandex_market_language.models.offers.EventTicketOffer[source]

Abstract method for parsing the xml element into a dictionary.

hall
hall_part
is_kids
is_premiere
name
offer_id
old_price
pictures
place
price
sales_notes
supplier
url
vendor
vendor_code
class yandex_market_language.models.offers.MedicineOffer(name, delivery, pickup, **kwargs)[source]

Bases: yandex_market_language.models.offers.AbstractOffer

Medicine offer.

Docs: https://yandex.ru/support/partnermarket/export/medicine.html

age
barcodes
bid
category_id
condition
create_dict(**kwargs) → dict[source]

Must be inherited by each child class. Describes the logic for creating a dictionary with data from a model.

create_xml(**kwargs) → xml.etree.ElementTree.Element[source]

Must be inherited by each child class. Describes the logic for creating a xml with data from a model.

credit_template_id
currency
description
dimensions
static from_xml(offer_el: xml.etree.ElementTree.Element, **mapping) → yandex_market_language.models.offers.MedicineOffer[source]

Abstract method for parsing the xml element into a dictionary.

name
offer_id
old_price
pictures
price
sales_notes
supplier
url
vendor
vendor_code
class yandex_market_language.models.offers.MusicVideoOffer(title: str, artist: str = None, year=None, media: str = None, starring: str = None, director: str = None, original_name: str = None, country: str = None, **kwargs)[source]

Bases: yandex_market_language.models.fields.year.YearField, yandex_market_language.models.offers.AbstractOffer

Music or video offer.

Docs: https://yandex.ru/support/partnermarket/export/music-video.html

age
artist
barcodes
bid
category_id
condition
country
create_dict(**kwargs) → dict[source]

Must be inherited by each child class. Describes the logic for creating a dictionary with data from a model.

create_xml(**kwargs) → xml.etree.ElementTree.Element[source]

Must be inherited by each child class. Describes the logic for creating a xml with data from a model.

credit_template_id
currency
description
dimensions
director
static from_xml(offer_el: xml.etree.ElementTree.Element, **mapping) → yandex_market_language.models.offers.MusicVideoOffer[source]

Abstract method for parsing the xml element into a dictionary.

media
offer_id
old_price
original_name
pictures
price
sales_notes
starring
supplier
title
url
vendor
vendor_code
class yandex_market_language.models.offers.SimplifiedOffer(name, **kwargs)[source]

Bases: yandex_market_language.models.offers.AbstractOffer

Simplified offer. In a simplified type, the manufacturer, type and name of the goods are indicated in one element - name.

Yandex.Market docs: https://yandex.ru/support/partnermarket/offers.html

age
barcodes
bid
category_id
condition
create_dict(**kwargs) → dict[source]

Must be inherited by each child class. Describes the logic for creating a dictionary with data from a model.

create_xml(**kwargs) → xml.etree.ElementTree.Element[source]

Must be inherited by each child class. Describes the logic for creating a xml with data from a model.

credit_template_id
currency
description
dimensions
static from_xml(offer_el: xml.etree.ElementTree.Element, **mapping) → yandex_market_language.models.offers.SimplifiedOffer[source]

Abstract method for parsing the xml element into a dictionary.

name
offer_id
old_price
pictures
price
sales_notes
supplier
url
vendor
vendor_code

yandex_market_language.models.option module

class yandex_market_language.models.option.Option(cost, days, order_before=None)[source]

Bases: yandex_market_language.models.abstract.AbstractModel

Option model for both the delivery option and the pickup option.

Docs: https://yandex.ru/support/partnermarket/elements/delivery-options.html https://yandex.ru/support/partnermarket/elements/pickup-options.html

cost
create_dict(**kwargs) → dict[source]

Must be inherited by each child class. Describes the logic for creating a dictionary with data from a model.

create_xml(**kwargs) → xml.etree.ElementTree.Element[source]

Must be inherited by each child class. Describes the logic for creating a xml with data from a model.

days
static from_xml(el: xml.etree.ElementTree.Element) → yandex_market_language.models.option.Option[source]

Must be inherited by each child class. Describes the logic for creating a model from an xml element.

order_before

yandex_market_language.models.price module

class yandex_market_language.models.price.Price(value, is_starting=False)[source]

Bases: yandex_market_language.models.abstract.AbstractModel

Actual offer price model.

create_dict(**kwargs) → dict[source]

Must be inherited by each child class. Describes the logic for creating a dictionary with data from a model.

create_xml(**kwargs) → xml.etree.ElementTree.Element[source]

Must be inherited by each child class. Describes the logic for creating a xml with data from a model.

static from_xml(el: xml.etree.ElementTree.Element) → yandex_market_language.models.abstract.AbstractModel[source]

Must be inherited by each child class. Describes the logic for creating a model from an xml element.

is_starting
value

yandex_market_language.models.shop module

class yandex_market_language.models.shop.Shop(name: str, company: str, url: str, currencies: List[models.Currency], categories: List[models.Category], offers: List[models.offers.AbstractOffer], platform: str = None, version: str = None, agency: str = None, email: str = None, delivery_options: List[models.Option] = None, pickup_options: List[models.Option] = None, enable_auto_discounts=None, gifts: List[models.Gift] = None, promos: List[models.Promo] = None)[source]

Bases: yandex_market_language.models.fields.enable_auto_discounts.EnableAutoDiscountField, yandex_market_language.models.fields.options.DeliveryOptionsField, yandex_market_language.models.fields.options.PickupOptionsField, yandex_market_language.models.abstract.AbstractModel

Shop model.

Docs: https://yandex.ru/support/partnermarket/elements/shop.html

agency
categories
company
create_dict(**kwargs) → dict[source]

Must be inherited by each child class. Describes the logic for creating a dictionary with data from a model.

create_xml(**kwargs) → xml.etree.ElementTree.Element[source]

Must be inherited by each child class. Describes the logic for creating a xml with data from a model.

currencies
email
static from_xml(shop_el: xml.etree.ElementTree.Element) → yandex_market_language.models.shop.Shop[source]

Must be inherited by each child class. Describes the logic for creating a model from an xml element.

gifts
name
offers
platform
promos
url
version

Module contents

class yandex_market_language.models.AbstractModel[source]

Bases: abc.ABC

Abstract model for creating child models.

clean_dict

A helper property to get clean dictionary with data.

create_dict(**kwargs) → dict[source]

Must be inherited by each child class. Describes the logic for creating a dictionary with data from a model.

create_xml(**kwargs) → xml.etree.ElementTree.Element[source]

Must be inherited by each child class. Describes the logic for creating a xml with data from a model.

static from_xml(el: xml.etree.ElementTree.Element) → yandex_market_language.models.abstract.AbstractModel[source]

Must be inherited by each child class. Describes the logic for creating a model from an xml element.

to_dict(clean: bool = False) → dict[source]

Calls the inherited method to create the dictionary and returns a clean dictionary if the parameter was set.

to_xml(root_el: xml.etree.ElementTree.Element = None) → xml.etree.ElementTree.Element[source]

Calls the inherited method to create the element and appends it to the parent, if it was set.

class yandex_market_language.models.Feed(shop: yandex_market_language.models.shop.Shop, date: None.datetime.date = None)[source]

Bases: yandex_market_language.models.abstract.AbstractModel

YML Feed model.

Docs: https://yandex.ru/support/partnermarket/export/yml.html

create_dict(**kwargs) → dict[source]

Must be inherited by each child class. Describes the logic for creating a dictionary with data from a model.

create_xml(**kwargs) → xml.etree.ElementTree.Element[source]

Must be inherited by each child class. Describes the logic for creating a xml with data from a model.

date
static from_xml(el: xml.etree.ElementTree.Element) → yandex_market_language.models.feed.Feed[source]

Must be inherited by each child class. Describes the logic for creating a model from an xml element.

shop
class yandex_market_language.models.Shop(name: str, company: str, url: str, currencies: List[models.Currency], categories: List[models.Category], offers: List[models.offers.AbstractOffer], platform: str = None, version: str = None, agency: str = None, email: str = None, delivery_options: List[models.Option] = None, pickup_options: List[models.Option] = None, enable_auto_discounts=None, gifts: List[models.Gift] = None, promos: List[models.Promo] = None)[source]

Bases: yandex_market_language.models.fields.enable_auto_discounts.EnableAutoDiscountField, yandex_market_language.models.fields.options.DeliveryOptionsField, yandex_market_language.models.fields.options.PickupOptionsField, yandex_market_language.models.abstract.AbstractModel

Shop model.

Docs: https://yandex.ru/support/partnermarket/elements/shop.html

agency
categories
company
create_dict(**kwargs) → dict[source]

Must be inherited by each child class. Describes the logic for creating a dictionary with data from a model.

create_xml(**kwargs) → xml.etree.ElementTree.Element[source]

Must be inherited by each child class. Describes the logic for creating a xml with data from a model.

currencies
email
static from_xml(shop_el: xml.etree.ElementTree.Element) → yandex_market_language.models.shop.Shop[source]

Must be inherited by each child class. Describes the logic for creating a model from an xml element.

gifts
name
offers
platform
promos
url
version
class yandex_market_language.models.Currency(currency, rate, plus=None)[source]

Bases: yandex_market_language.models.abstract.AbstractModel

Currency model. Used to create a list of shop currency rates.

Docs: https://yandex.ru/support/partnermarket/elements/currencies.html

create_dict(**kwargs) → dict[source]

Must be inherited by each child class. Describes the logic for creating a dictionary with data from a model.

create_xml(**kwargs) → xml.etree.ElementTree.Element[source]

Must be inherited by each child class. Describes the logic for creating a xml with data from a model.

currency
static from_xml(el: xml.etree.ElementTree.Element) → yandex_market_language.models.currency.Currency[source]

Must be inherited by each child class. Describes the logic for creating a model from an xml element.

plus
rate
class yandex_market_language.models.Category(category_id, name, parent_id=None)[source]

Bases: yandex_market_language.models.abstract.AbstractModel

Category model for shop.

Docs: https://yandex.ru/support/partnermarket/elements/categories.html

category_id
create_dict(**kwargs) → dict[source]

Must be inherited by each child class. Describes the logic for creating a dictionary with data from a model.

create_xml(**kwargs) → xml.etree.ElementTree.Element[source]

Must be inherited by each child class. Describes the logic for creating a xml with data from a model.

static from_xml(el: xml.etree.ElementTree.Element) → yandex_market_language.models.category.Category[source]

Must be inherited by each child class. Describes the logic for creating a model from an xml element.

name
parent_id
class yandex_market_language.models.Option(cost, days, order_before=None)[source]

Bases: yandex_market_language.models.abstract.AbstractModel

Option model for both the delivery option and the pickup option.

Docs: https://yandex.ru/support/partnermarket/elements/delivery-options.html https://yandex.ru/support/partnermarket/elements/pickup-options.html

cost
create_dict(**kwargs) → dict[source]

Must be inherited by each child class. Describes the logic for creating a dictionary with data from a model.

create_xml(**kwargs) → xml.etree.ElementTree.Element[source]

Must be inherited by each child class. Describes the logic for creating a xml with data from a model.

days
static from_xml(el: xml.etree.ElementTree.Element) → yandex_market_language.models.option.Option[source]

Must be inherited by each child class. Describes the logic for creating a model from an xml element.

order_before
class yandex_market_language.models.Price(value, is_starting=False)[source]

Bases: yandex_market_language.models.abstract.AbstractModel

Actual offer price model.

create_dict(**kwargs) → dict[source]

Must be inherited by each child class. Describes the logic for creating a dictionary with data from a model.

create_xml(**kwargs) → xml.etree.ElementTree.Element[source]

Must be inherited by each child class. Describes the logic for creating a xml with data from a model.

static from_xml(el: xml.etree.ElementTree.Element) → yandex_market_language.models.abstract.AbstractModel[source]

Must be inherited by each child class. Describes the logic for creating a model from an xml element.

is_starting
value
class yandex_market_language.models.SimplifiedOffer(name, **kwargs)[source]

Bases: yandex_market_language.models.offers.AbstractOffer

Simplified offer. In a simplified type, the manufacturer, type and name of the goods are indicated in one element - name.

Yandex.Market docs: https://yandex.ru/support/partnermarket/offers.html

age
barcodes
bid
category_id
condition
create_dict(**kwargs) → dict[source]

Must be inherited by each child class. Describes the logic for creating a dictionary with data from a model.

create_xml(**kwargs) → xml.etree.ElementTree.Element[source]

Must be inherited by each child class. Describes the logic for creating a xml with data from a model.

credit_template_id
currency
description
dimensions
static from_xml(offer_el: xml.etree.ElementTree.Element, **mapping) → yandex_market_language.models.offers.SimplifiedOffer[source]

Abstract method for parsing the xml element into a dictionary.

name
offer_id
old_price
pictures
price
sales_notes
supplier
url
vendor
vendor_code
class yandex_market_language.models.ArbitraryOffer(model: str, vendor: str, type_prefix: str = None, **kwargs)[source]

Bases: yandex_market_language.models.offers.AbstractOffer

Arbitrary offer. In an arbitrary type, the manufacturer, type and name of the product must be indicated in separate elements - model, vendor & typePrefix.

Yandex.Market docs: https://yandex.ru/support/partnermarket/export/vendor-model.html

age
barcodes
bid
category_id
condition
create_dict(**kwargs) → dict[source]

Must be inherited by each child class. Describes the logic for creating a dictionary with data from a model.

create_xml(**kwargs) → xml.etree.ElementTree.Element[source]

Must be inherited by each child class. Describes the logic for creating a xml with data from a model.

credit_template_id
currency
description
dimensions
static from_xml(offer_el: xml.etree.ElementTree.Element, **mapping) → yandex_market_language.models.offers.ArbitraryOffer[source]

Abstract method for parsing the xml element into a dictionary.

model
offer_id
old_price
pictures
price
sales_notes
supplier
type_prefix
url
vendor
vendor_code
class yandex_market_language.models.BookOffer(binding=None, page_extent=None, **kwargs)[source]

Bases: yandex_market_language.models.offers.AbstractBookOffer

Special offer type for books.

Yandex.Market docs: https://yandex.ru/support/partnermarket/export/books.html

age
author
barcodes
bid
binding
category_id
condition
create_dict(**kwargs) → dict[source]

Must be inherited by each child class. Describes the logic for creating a dictionary with data from a model.

create_xml(**kwargs) → xml.etree.ElementTree.Element[source]

Must be inherited by each child class. Describes the logic for creating a xml with data from a model.

credit_template_id
currency
description
dimensions
static from_xml(offer_el: xml.etree.ElementTree.Element, **mapping) → yandex_market_language.models.offers.BookOffer[source]

Abstract method for parsing the xml element into a dictionary.

isbn
language
name
offer_id
old_price
page_extent
pictures
price
publisher
sales_notes
series
supplier
table_of_contents
url
vendor
vendor_code
class yandex_market_language.models.AudioBookOffer(performed_by: str = None, performance_type: str = None, storage: str = None, audio_format: str = None, recording_length: str = None, **kwargs)[source]

Bases: yandex_market_language.models.offers.AbstractBookOffer

Audio book offer.

Docs: https://yandex.ru/support/partnermarket/export/audiobooks.html

age
audio_format
author
barcodes
bid
category_id
condition
create_dict(**kwargs) → dict[source]

Must be inherited by each child class. Describes the logic for creating a dictionary with data from a model.

create_xml(**kwargs) → xml.etree.ElementTree.Element[source]

Must be inherited by each child class. Describes the logic for creating a xml with data from a model.

credit_template_id
currency
description
dimensions
static from_xml(offer_el: xml.etree.ElementTree.Element, **mapping) → yandex_market_language.models.offers.AudioBookOffer[source]

Abstract method for parsing the xml element into a dictionary.

isbn
language
name
offer_id
old_price
performance_type
performed_by
pictures
price
publisher
recording_length
sales_notes
series
storage
supplier
table_of_contents
url
vendor
vendor_code
class yandex_market_language.models.MusicVideoOffer(title: str, artist: str = None, year=None, media: str = None, starring: str = None, director: str = None, original_name: str = None, country: str = None, **kwargs)[source]

Bases: yandex_market_language.models.fields.year.YearField, yandex_market_language.models.offers.AbstractOffer

Music or video offer.

Docs: https://yandex.ru/support/partnermarket/export/music-video.html

age
artist
barcodes
bid
category_id
condition
country
create_dict(**kwargs) → dict[source]

Must be inherited by each child class. Describes the logic for creating a dictionary with data from a model.

create_xml(**kwargs) → xml.etree.ElementTree.Element[source]

Must be inherited by each child class. Describes the logic for creating a xml with data from a model.

credit_template_id
currency
description
dimensions
director
static from_xml(offer_el: xml.etree.ElementTree.Element, **mapping) → yandex_market_language.models.offers.MusicVideoOffer[source]

Abstract method for parsing the xml element into a dictionary.

media
offer_id
old_price
original_name
pictures
price
sales_notes
starring
supplier
title
url
vendor
vendor_code
class yandex_market_language.models.MedicineOffer(name, delivery, pickup, **kwargs)[source]

Bases: yandex_market_language.models.offers.AbstractOffer

Medicine offer.

Docs: https://yandex.ru/support/partnermarket/export/medicine.html

age
barcodes
bid
category_id
condition
create_dict(**kwargs) → dict[source]

Must be inherited by each child class. Describes the logic for creating a dictionary with data from a model.

create_xml(**kwargs) → xml.etree.ElementTree.Element[source]

Must be inherited by each child class. Describes the logic for creating a xml with data from a model.

credit_template_id
currency
description
dimensions
static from_xml(offer_el: xml.etree.ElementTree.Element, **mapping) → yandex_market_language.models.offers.MedicineOffer[source]

Abstract method for parsing the xml element into a dictionary.

name
offer_id
old_price
pictures
price
sales_notes
supplier
url
vendor
vendor_code
class yandex_market_language.models.EventTicketOffer(name: str, place: str, date, hall: str = None, hall_part: str = None, is_premiere=None, is_kids=None, **kwargs)[source]

Bases: yandex_market_language.models.offers.AbstractOffer

EventTicket offer.

Docs: https://yandex.ru/support/partnermarket/export/event-tickets.html

age
barcodes
bid
category_id
condition
create_dict(**kwargs) → dict[source]

Must be inherited by each child class. Describes the logic for creating a dictionary with data from a model.

create_xml(**kwargs) → xml.etree.ElementTree.Element[source]

Must be inherited by each child class. Describes the logic for creating a xml with data from a model.

credit_template_id
currency
date
description
dimensions
static from_xml(offer_el: xml.etree.ElementTree.Element, **mapping) → yandex_market_language.models.offers.EventTicketOffer[source]

Abstract method for parsing the xml element into a dictionary.

hall
hall_part
is_kids
is_premiere
name
offer_id
old_price
pictures
place
price
sales_notes
supplier
url
vendor
vendor_code
class yandex_market_language.models.AlcoholOffer(name: str, vendor: str, barcodes: List[str], parameters: List[yandex_market_language.models.parameter.Parameter], **kwargs)[source]

Bases: yandex_market_language.models.offers.AbstractOffer

Alcohol offer.

Docs: https://yandex.ru/support/partnermarket/export/alcohol.html

age
barcodes
bid
category_id
condition
create_dict(**kwargs) → dict[source]

Must be inherited by each child class. Describes the logic for creating a dictionary with data from a model.

create_xml(**kwargs) → xml.etree.ElementTree.Element[source]

Must be inherited by each child class. Describes the logic for creating a xml with data from a model.

credit_template_id
currency
description
dimensions
static from_xml(offer_el: xml.etree.ElementTree.Element, **mapping) → yandex_market_language.models.offers.AlcoholOffer[source]

Abstract method for parsing the xml element into a dictionary.

name
offer_id
old_price
parameters
pictures
price
sales_notes
supplier
url
vendor
vendor_code
class yandex_market_language.models.Parameter(name: str, value: str, unit: str = None)[source]

Bases: yandex_market_language.models.abstract.AbstractModel

Model of offer characteristics and parameters.

Docs: https://yandex.ru/support/partnermarket/elements/param.html

create_dict(**kwargs) → dict[source]

Must be inherited by each child class. Describes the logic for creating a dictionary with data from a model.

create_xml(**kwargs) → xml.etree.ElementTree.Element[source]

Must be inherited by each child class. Describes the logic for creating a xml with data from a model.

static from_xml(el: xml.etree.ElementTree.Element) → yandex_market_language.models.parameter.Parameter[source]

Must be inherited by each child class. Describes the logic for creating a model from an xml element.

name
unit
value
class yandex_market_language.models.Condition(condition_type: str, reason: str)[source]

Bases: yandex_market_language.models.abstract.AbstractModel

Condition model. Used for used goods and goods discounted due to deficiencies.

Docs: https://yandex.ru/support/partnermarket/elements/condition.html

condition_type
create_dict(**kwargs) → dict[source]

Must be inherited by each child class. Describes the logic for creating a dictionary with data from a model.

create_xml(**kwargs) → xml.etree.ElementTree.Element[source]

Must be inherited by each child class. Describes the logic for creating a xml with data from a model.

static from_xml(el: xml.etree.ElementTree.Element) → yandex_market_language.models.condition.Condition[source]

Must be inherited by each child class. Describes the logic for creating a model from an xml element.

reason
class yandex_market_language.models.Dimensions(length, wight, height)[source]

Bases: yandex_market_language.models.abstract.AbstractModel

Offer dimensions model (length, width, height) in the package in centimeters.

create_dict(**kwargs) → dict[source]

Must be inherited by each child class. Describes the logic for creating a dictionary with data from a model.

create_xml(**kwargs) → xml.etree.ElementTree.Element[source]

Must be inherited by each child class. Describes the logic for creating a xml with data from a model.

static from_xml(el: xml.etree.ElementTree.Element) → yandex_market_language.models.dimensions.Dimensions[source]

Must be inherited by each child class. Describes the logic for creating a model from an xml element.

height
length
width
class yandex_market_language.models.Age(unit: str, value)[source]

Bases: yandex_market_language.models.abstract.AbstractModel

Age category of the offer.

create_dict(**kwargs) → dict[source]

Must be inherited by each child class. Describes the logic for creating a dictionary with data from a model.

create_xml(**kwargs) → xml.etree.ElementTree.Element[source]

Must be inherited by each child class. Describes the logic for creating a xml with data from a model.

static from_xml(el: xml.etree.ElementTree.Element) → yandex_market_language.models.age.Age[source]

Must be inherited by each child class. Describes the logic for creating a model from an xml element.

unit
value
class yandex_market_language.models.Gift(id: str, name: str, pictures: List[str] = None)[source]

Bases: yandex_market_language.models.abstract.AbstractModel

Gift model.

Docs: https://yandex.ru/support/partnermarket/elements/promo-gift.html

create_dict(**kwargs) → dict[source]

Must be inherited by each child class. Describes the logic for creating a dictionary with data from a model.

create_xml(**kwargs) → xml.etree.ElementTree.Element[source]

Must be inherited by each child class. Describes the logic for creating a xml with data from a model.

static from_xml(gift_el: xml.etree.ElementTree.Element) → yandex_market_language.models.gift.Gift[source]

Must be inherited by each child class. Describes the logic for creating a model from an xml element.

id
name
pictures
class yandex_market_language.models.Promo(promo_id: str, promo_type: str, purchase: yandex_market_language.models.promo.Purchase, promo_gifts: List[PromoGift], start_date=None, end_date=None, description=None, url=None)[source]

Bases: yandex_market_language.models.abstract.AbstractModel

Docs: https://yandex.ru/support/partnermarket/elements/promo-gift.html

MAPPING = {'description': 'description', 'end-date': 'end_date', 'start-date': 'start_date', 'url': 'url'}
create_dict(**kwargs) → dict[source]

Must be inherited by each child class. Describes the logic for creating a dictionary with data from a model.

create_xml(**kwargs) → xml.etree.ElementTree.Element[source]

Must be inherited by each child class. Describes the logic for creating a xml with data from a model.

description
end_date
classmethod from_xml(promo_el: xml.etree.ElementTree.Element) → yandex_market_language.models.promo.Promo[source]

Must be inherited by each child class. Describes the logic for creating a model from an xml element.

promo_gifts
promo_id
promo_type
purchase
start_date
url
class yandex_market_language.models.Purchase(products: List[Product], required_quantity='1')[source]

Bases: yandex_market_language.models.abstract.AbstractModel

Docs: https://yandex.ru/support/partnermarket/elements/promo-gift.html

create_dict(**kwargs) → dict[source]

Must be inherited by each child class. Describes the logic for creating a dictionary with data from a model.

create_xml(**kwargs) → xml.etree.ElementTree.Element[source]

Must be inherited by each child class. Describes the logic for creating a xml with data from a model.

static from_xml(purchase_el: xml.etree.ElementTree.Element) → yandex_market_language.models.promo.Purchase[source]

Must be inherited by each child class. Describes the logic for creating a model from an xml element.

products
required_quantity
class yandex_market_language.models.Product(offer_id: str = None, category_id: str = None)[source]

Bases: yandex_market_language.models.abstract.AbstractModel

Docs: https://yandex.ru/support/partnermarket/elements/promo-gift.html

category_id
create_dict(**kwargs) → dict[source]

Must be inherited by each child class. Describes the logic for creating a dictionary with data from a model.

create_xml(**kwargs) → xml.etree.ElementTree.Element[source]

Must be inherited by each child class. Describes the logic for creating a xml with data from a model.

static from_xml(product_el: xml.etree.ElementTree.Element) → yandex_market_language.models.promo.Product[source]

Must be inherited by each child class. Describes the logic for creating a model from an xml element.

offer_id
class yandex_market_language.models.PromoGift(offer_id: str = None, gift_id: str = None)[source]

Bases: yandex_market_language.models.abstract.AbstractModel

Docs: https://yandex.ru/support/partnermarket/elements/promo-gift.html

create_dict(**kwargs) → dict[source]

Must be inherited by each child class. Describes the logic for creating a dictionary with data from a model.

create_xml(**kwargs) → xml.etree.ElementTree.Element[source]

Must be inherited by each child class. Describes the logic for creating a xml with data from a model.

static from_xml(el: xml.etree.ElementTree.Element) → yandex_market_language.models.promo.PromoGift[source]

Must be inherited by each child class. Describes the logic for creating a model from an xml element.

gift_id
offer_id