.. autoclass:: easydata.processors.item::ItemKeysMergeIntoListProcessor
ItemKeysMergeIntoDictProcessor
creates a list of values under a new key on
a basis of specified keys in item dictionary.
.. option:: new_item_key
.. option:: item_keys
.. option:: preserve_original
.. option:: ignore_none
.. autoclass:: easydata.processors.item::ItemKeysMergeProcessor
.. option:: new_item_key
.. option:: preserve_original
.. option:: separator
.. autoclass:: easydata.processors.item::ItemKeysMergeIntoDictProcessor
ItemKeysMergeIntoDictProcessor
creates a dictionary under a new key on
a basis of specified keys in item dictionary.
.. option:: new_item_key
.. option:: item_keys
.. option:: preserve_original
.. option:: ignore_none
.. autoclass:: easydata.processors.item::ItemValueToStrProcessor
ItemValueToStrProcessor
converts values from various types to str.
.. option:: item_keys
.. option:: none_as_empty_string
.. autoclass:: easydata.processors.item::ItemRemoveKeysProcessor
ItemRemoveKeysProcessor
removes keys from item dictionary.
.. option:: item_keys
.. autoclass:: easydata.processors.item::ItemDiscountProcessor
ItemDiscountProcessor
looks for parsed price
and sale_price
in item
dictionary and calculates discount percentage between those two values. Finally
it creates a new discount key in item dictionary and attaches discount value to it.
If our price and sale price values live under different keys under item dictionary
than default ones price
and sale_price
, then we can through parameters,
change those default values in order to suit our needs.
All parameters that ItemDiscountProcessor
accepts are listed bellow:
.. option:: item_price_key
Note
Default value of item_price_key parameter can be defined through a config variable :ref:`config-ed-item-discount-item-price-key` in a config file or a model.
.. option:: item_sale_price_key
Note
Default value of item_sale_price_key parameter can be defined through a config variable :ref:`config-ed-item-discount-item-sale-price-key` in a config file or a model.
.. option:: item_discount_key
Note
Default value of item_discount_key parameter can be defined through a config variable :ref:`config-ed-item-discount-item-discount-key` in a config file or a model.
.. option:: decimals
Note
Default value of decimals parameter can be defined through a config variable :ref:`config-ed-item-discount-decimals` in a config file or a model.
.. option:: no_decimals
Note
Default value of no_decimals parameter can be defined through a config variable :ref:`config-ed-item-discount-no-decimals` in a config file or a model.
.. option:: remove_item_sale_price_key
Note
Default value of remove_item_sale_price_key parameter can be defined through a config variable :ref:`config-ed-item-discount-rm-item-sale-price-key` in a config file or a model.