Up_DW.upload_inventory (eng) - datawizio/pythonAPI GitHub Wiki

Up_DW.upload_inventory - uploads inventory data to the server.

_Uploads inventory information to the server._

Gets a list of objects of the product

        [
            {
               'shop_id': <shop_id>,
               'product_id': <product_id>,
               'date': <date>,
               'qty': <qty>,
               'original_price': <original_price>,
               'stock_total_price': <price>
            }
        ]

or a path to the file *.csv.

Parameters:

  • columns: list
  • default:
    [              
           'invoice_id', 
           'invoice_inner_id',
           'shop_id',
           'order_id',
           'provider_id', 
           'date', 
           'employee_id',
           'product_id',
           'qty',
           'original_price',
           'stock_total_price'
    ]
    

    Sorted list of columns in the table in the file *.csv/

  • splitter: str, default: ";"

    Splitter of data in the file *.csv.

  • skip_chunks: int, default: 0

    Number of data blocks that have to be omitted.

  • Examples:

    dwup = datawiz_upload.Up_DW()
    dwup.upload_inventory('/home/user/inventory.csv', skip_chunks=2)
    
    ⚠️ **GitHub.com Fallback** ⚠️