pypi python-amazon-sp-api 2.1.23
v2.1.23

4 hours ago

Version 2.1.23

New Features

  • Reports API:
    • Added support for retrieving the character encoding of downloaded report documents. The encoding is available as response.character_code. If a character code is explicitly provided, it is echoed back; otherwise, it is resolved from the document response's Content-Type. For metadata-only calls, response.character_code is None.

Bug Fixes

  • Reports API:
    • Fixed an issue where the character encoding information could be incorrectly set or omitted when handling report documents.

Internal

  • Testing:
    • Added comprehensive tests for the new character encoding feature in the Reports API. These tests ensure correct behavior when downloading documents, writing to files, and handling various character encodings.

Diagram of Character Encoding Handling

graph TD;
    A[Request Report Document] --> B{Download/Decrypt};
    B -->|Yes| C[Resolve Character Encoding];
    B -->|No| D[Set character_code to None];
    C --> E[Return ApiResponse with character_code];
    D --> E;
Loading

These changes enhance the usability of the Reports API by providing more detailed information about document encoding, which is crucial for correctly processing and displaying report data.

Don't miss a new python-amazon-sp-api release

NewReleases is sending notifications on new releases.