amazon-sp-api-clients's People
amazon-sp-api-clients's Issues
AWSSigV4 Usage Incorrect
I'm not able to make requests according to the README. I keep getting 403 errors. When I debugged to see what the actual headers, params, and auth were, I saw that the auth values from AWSSigV4
were different than the auth values when I used the original saleweaver library.
I think this is because you are passing in different values into the AWSSigV4
method: This library calls it in the following way
amazon-sp-api-clients/amazon_sp_api_clients/base.py
Lines 269 to 273 in 6a7f0df
The Saleweaver library calls it using the user's
aws_acces_key
and aws_secret_key
Due to this difference, I get different auth
values passed to the request. In the saleweaver
library, I am able to make the request, but in this library, I am getting a 403 response.
About RDT
Currently, the lib does not support RDT. If you need it, please contact me.
createUploadDestinationForResource 后如何上传文件?
请问,createUploadDestinationForResource 以后返回
{'payload': {'uploadDestinationId': 'f253937a-898c-4bf3-82d3-7f9f46757xxx', 'url': 'https://s3.amazonaws.com/buyer-seller-messaging-prod-draft-attachment-namarketplace/%2F-05/f253937a-898c-4bf3-82d3-7f9f46757xxx?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20210814T145150Z&X-Amz-SignedHeaders=content-md5%3Bhost%3Bx-amz-server-side-encryption&X-Amz-Expires=900&X-Amz-Credential=AKIATURGXBJBNPDC6UFH%2F20210814%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Signature=54d45ec6ae45b242e24a5033ced5c060e3f5046cf4aeedd1a3652297080be1c2', 'headers': {'x-amz-server-side-encryption': 'aws:kms', 'Content-MD5': 'f8cf544ccce337254aa39c3635487f3b'}}}
然后如何上传文件到 s3?用 request 会返回
<Error><Code>SignatureDoesNotMatch</Code><Message>The request signature we calculated does not match the signature you provided. Check your key and signing method.</Message><AWSAccessKeyId>AKIATURGXBJBNPDC6UFH</AWSAccessKeyId>
TypeError: Cannot create a consistent method resolution
使用pip install amazon-sp-api-clients安装后,按Readme中所述编写 test.py文件,配置所需的6个参数,运行后报如下错误,不知是否版本兼容性问题:
[root@bingo pythons]# python3 testspapi.py
Traceback (most recent call last):
File "testspapi.py", line 3, in
import amazon_sp_api_clients
File "/usr/local/lib/python3.6/site-packages/amazon_sp_api_clients/init.py", line 1, in
from .aplus_content_2020_11_01 import AplusContent20201101Client
File "/usr/local/lib/python3.6/site-packages/amazon_sp_api_clients/aplus_content_2020_11_01.py", line 871, in
class MessageSet(list, _List["Error"]):
File "/usr/lib64/python3.6/typing.py", line 978, in new
self = super().new(cls, name, bases, namespace, _root=True)
File "/usr/lib64/python3.6/typing.py", line 137, in new
return super().new(cls, name, bases, namespace)
File "/usr/lib64/python3.6/abc.py", line 133, in new
cls = super().new(mcls, name, bases, namespace, **kwargs)
TypeError: Cannot create a consistent method resolution
order (MRO) for bases list, List
[root@bingo pythons]#
当前python版本为:
[root@bingo pythons]# python3
Python 3.6.8 (default, Nov 16 2020, 16:55:22)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-44)] on linux
Type "help", "copyright", "credits" or "license" for more information.
Refactor plan
The refactor plan of the project.
Mainly focuses on performance enhancement.
If you want to provide some contributions, please comment here.
The refactor will be finished in about 6 months.
- remove the useless peewee support;
- all clients share the same auth object;
- change arguments from simple
data
to keyword arguments, and consider therequired
property. - both async and sync support, use async io and requests, provide two main interfaces:
AmazonSpApiClients
andAsyncAmazonSpApiClients
; - lazy import, use
cached_property
; - use the previously existing swagger model, instead of parsing the JSON manually;
- CI/CD support, use sandbox API;
- to be continued.
the exception is inherit from base exception instead of exception
Other enhancements
If you need any other support about the SDK, please contact me. It's FREE!
如果您需要SDK层面的其他协助,请联系我,免费!
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.