'WooCommerce Rest Api Python - duplicate existing product

Is there an easy way to duplicate an existing product with the WooCommerce Rest API and Python? ... for example ...

data = wcapi.get("products/"+str(id)).json()
wcapi.post("products", data)


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source