python - 卖家电商 : How to batch insert products through python code or API

标签 python django graphql e-commerce saleor

我正在尝试通过 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/

相关文章:

django - 为什么当我将 @api_view 添加到我的 View 中时,我得到 403

python - Django rest-auth 中的 create 和 perform_create 方法有什么区别

javascript - 类型\"me\"的字段\"User\"必须具有一系列子字段

python - 如何使用列名列表从旧数据帧创建新的 pandas 数据帧

python - 哪种序列类型不支持 "extend slicing"?

Python:替换字典值中的特定单词

javascript - 在 django 中提交表单上的两个返回语句

angular - Apollo:将查询中的某些过滤器的数据视为陈旧真实

swift - Swift 中的 Github GraphQL 查询 "Not Found"

python反向引用正则表达式