我正在尝试通过 python 从某些 cvs 文件自动添加一些产品,对销售或电子商务 cms 进行一些测试 不幸的是,我只找到了一些用于从数据库读取现有产品的 GraphQL API 示例 Saleor Product Bulk upload script但我找不到任何可以使用 GraphQL API 添加产品的信息。 有什么建议吗?
最佳答案
pytest 装置很好地介绍了如何在 python 中以编程方式创建产品 - https://github.com/mirumee/saleor/blob/master/tests/conftest.py#L389
此外,我认为不存在用于添加产品的批量 API。从代码中我可以看到它们是用于删除和内容(管理)-https://github.com/mirumee/saleor/blob/master/saleor/graphql/product/bulk_mutations/products.py
关于python - 卖家电商 : How to batch insert products through python code or API,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56518093/