python-amazon-paapi 5.0.0__tar.gz → 5.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (177) hide show
  1. python_amazon_paapi-5.1.0/.agent/rules/code-style-guide.md +27 -0
  2. python_amazon_paapi-5.1.0/.env.template +4 -0
  3. python_amazon_paapi-5.1.0/.github/ISSUE_TEMPLATE/---bug-report.md +23 -0
  4. python_amazon_paapi-5.1.0/.github/ISSUE_TEMPLATE/---feature-request.md +20 -0
  5. python_amazon_paapi-5.1.0/.github/ISSUE_TEMPLATE/config.yml +4 -0
  6. python_amazon_paapi-5.1.0/.github/workflows/check.yml +94 -0
  7. python_amazon_paapi-5.1.0/.github/workflows/release.yml +79 -0
  8. python_amazon_paapi-5.1.0/.gitignore +110 -0
  9. python_amazon_paapi-5.1.0/.pre-commit-config.yaml +61 -0
  10. python_amazon_paapi-5.1.0/.readthedocs.yml +21 -0
  11. python_amazon_paapi-5.1.0/CHANGELOG.md +42 -0
  12. {python-amazon-paapi-5.0.0 → python_amazon_paapi-5.1.0}/LICENSE +1 -1
  13. python_amazon_paapi-5.1.0/Makefile +29 -0
  14. python_amazon_paapi-5.1.0/PKG-INFO +160 -0
  15. python_amazon_paapi-5.1.0/README.md +129 -0
  16. python_amazon_paapi-5.1.0/amazon_paapi/__init__.py +7 -0
  17. {python-amazon-paapi-5.0.0 → python_amazon_paapi-5.1.0}/amazon_paapi/api.py +66 -52
  18. {python-amazon-paapi-5.0.0 → python_amazon_paapi-5.1.0}/amazon_paapi/errors/__init__.py +2 -0
  19. {python-amazon-paapi-5.0.0 → python_amazon_paapi-5.1.0}/amazon_paapi/errors/exceptions.py +4 -2
  20. python_amazon_paapi-5.1.0/amazon_paapi/helpers/__init__.py +1 -0
  21. python_amazon_paapi-5.1.0/amazon_paapi/helpers/arguments.py +93 -0
  22. {python-amazon-paapi-5.0.0 → python_amazon_paapi-5.1.0}/amazon_paapi/helpers/generators.py +7 -3
  23. python_amazon_paapi-5.1.0/amazon_paapi/helpers/items.py +21 -0
  24. python_amazon_paapi-5.1.0/amazon_paapi/helpers/requests.py +204 -0
  25. {python-amazon-paapi-5.0.0 → python_amazon_paapi-5.1.0}/amazon_paapi/models/__init__.py +10 -6
  26. {python-amazon-paapi-5.0.0 → python_amazon_paapi-5.1.0}/amazon_paapi/models/browse_nodes_result.py +11 -3
  27. {python-amazon-paapi-5.0.0 → python_amazon_paapi-5.1.0}/amazon_paapi/models/item_result.py +99 -13
  28. python_amazon_paapi-5.1.0/amazon_paapi/models/regions.py +105 -0
  29. python_amazon_paapi-5.1.0/amazon_paapi/models/search_result.py +18 -0
  30. python_amazon_paapi-5.1.0/amazon_paapi/models/variations_result.py +49 -0
  31. python_amazon_paapi-5.1.0/amazon_paapi/sdk/COPYING.txt +202 -0
  32. python_amazon_paapi-5.1.0/amazon_paapi/sdk/LICENSE.txt +202 -0
  33. python_amazon_paapi-5.1.0/amazon_paapi/sdk/NOTICE.txt +2 -0
  34. {python-amazon-paapi-5.0.0 → python_amazon_paapi-5.1.0}/amazon_paapi/sdk/api_client.py +7 -2
  35. python_amazon_paapi-5.1.0/amazon_paapi/tools/__init__.py +5 -0
  36. {python-amazon-paapi-5.0.0 → python_amazon_paapi-5.1.0}/amazon_paapi/tools/asin.py +2 -2
  37. python_amazon_paapi-5.1.0/docs/Makefile +20 -0
  38. python_amazon_paapi-5.1.0/docs/_static/pa-paapi-icon.ico +0 -0
  39. python_amazon_paapi-5.1.0/docs/_static/pa-paapi-logo.png +0 -0
  40. python_amazon_paapi-5.1.0/docs/amazon_paapi.errors.rst +7 -0
  41. python_amazon_paapi-5.1.0/docs/amazon_paapi.rst +10 -0
  42. python_amazon_paapi-5.1.0/docs/amazon_paapi.tools.rst +7 -0
  43. python_amazon_paapi-5.1.0/docs/conf.py +96 -0
  44. python_amazon_paapi-5.1.0/docs/index.rst +43 -0
  45. python_amazon_paapi-5.1.0/docs/make.bat +35 -0
  46. python_amazon_paapi-5.1.0/docs/pages/migration-guide-4.md +89 -0
  47. python_amazon_paapi-5.1.0/docs/pages/migration-guide-5.md +41 -0
  48. python_amazon_paapi-5.1.0/docs/pages/usage-guide.md +71 -0
  49. python_amazon_paapi-5.1.0/docs/requirements.txt +3 -0
  50. python_amazon_paapi-5.1.0/pyproject.toml +118 -0
  51. python_amazon_paapi-5.1.0/scripts/check_version.py +67 -0
  52. python_amazon_paapi-5.1.0/tests/__init__.py +1 -0
  53. python-amazon-paapi-5.0.0/tests/test_api.py → python_amazon_paapi-5.1.0/tests/api_test.py +9 -6
  54. python-amazon-paapi-5.0.0/tests/test_errors.py → python_amazon_paapi-5.1.0/tests/errors_test.py +2 -0
  55. python-amazon-paapi-5.0.0/tests/test_helpers_arguments.py → python_amazon_paapi-5.1.0/tests/helpers_arguments_test.py +2 -0
  56. python-amazon-paapi-5.0.0/tests/test_helpers_generators.py → python_amazon_paapi-5.1.0/tests/helpers_generators_test.py +2 -0
  57. python-amazon-paapi-5.0.0/tests/test_helpers_items.py → python_amazon_paapi-5.1.0/tests/helpers_items_test.py +15 -5
  58. python-amazon-paapi-5.0.0/tests/test_helpers_requests.py → python_amazon_paapi-5.1.0/tests/helpers_requests_test.py +11 -9
  59. python_amazon_paapi-5.1.0/tests/integration_test.py +38 -0
  60. python-amazon-paapi-5.0.0/tests/test_tools.py → python_amazon_paapi-5.1.0/tests/tools_test.py +2 -0
  61. python-amazon-paapi-5.0.0/PKG-INFO +0 -135
  62. python-amazon-paapi-5.0.0/README.md +0 -120
  63. python-amazon-paapi-5.0.0/amazon_paapi/__init__.py +0 -6
  64. python-amazon-paapi-5.0.0/amazon_paapi/helpers/__init__.py +0 -0
  65. python-amazon-paapi-5.0.0/amazon_paapi/helpers/arguments.py +0 -79
  66. python-amazon-paapi-5.0.0/amazon_paapi/helpers/items.py +0 -20
  67. python-amazon-paapi-5.0.0/amazon_paapi/helpers/requests.py +0 -175
  68. python-amazon-paapi-5.0.0/amazon_paapi/models/regions.py +0 -66
  69. python-amazon-paapi-5.0.0/amazon_paapi/models/search_result.py +0 -10
  70. python-amazon-paapi-5.0.0/amazon_paapi/models/variations_result.py +0 -33
  71. python-amazon-paapi-5.0.0/amazon_paapi/tools/__init__.py +0 -1
  72. python-amazon-paapi-5.0.0/pyproject.toml +0 -24
  73. python-amazon-paapi-5.0.0/python_amazon_paapi.egg-info/PKG-INFO +0 -135
  74. python-amazon-paapi-5.0.0/python_amazon_paapi.egg-info/SOURCES.txt +0 -132
  75. python-amazon-paapi-5.0.0/python_amazon_paapi.egg-info/dependency_links.txt +0 -1
  76. python-amazon-paapi-5.0.0/python_amazon_paapi.egg-info/requires.txt +0 -5
  77. python-amazon-paapi-5.0.0/python_amazon_paapi.egg-info/top_level.txt +0 -2
  78. python-amazon-paapi-5.0.0/setup.cfg +0 -4
  79. python-amazon-paapi-5.0.0/setup.py +0 -24
  80. python-amazon-paapi-5.0.0/tests/__init__.py +0 -0
  81. {python-amazon-paapi-5.0.0 → python_amazon_paapi-5.1.0}/amazon_paapi/sdk/__init__.py +0 -0
  82. {python-amazon-paapi-5.0.0 → python_amazon_paapi-5.1.0}/amazon_paapi/sdk/api/__init__.py +0 -0
  83. {python-amazon-paapi-5.0.0 → python_amazon_paapi-5.1.0}/amazon_paapi/sdk/api/default_api.py +0 -0
  84. {python-amazon-paapi-5.0.0 → python_amazon_paapi-5.1.0}/amazon_paapi/sdk/auth/__init__.py +0 -0
  85. {python-amazon-paapi-5.0.0 → python_amazon_paapi-5.1.0}/amazon_paapi/sdk/auth/sign_helper.py +0 -0
  86. {python-amazon-paapi-5.0.0 → python_amazon_paapi-5.1.0}/amazon_paapi/sdk/configuration.py +0 -0
  87. {python-amazon-paapi-5.0.0 → python_amazon_paapi-5.1.0}/amazon_paapi/sdk/models/__init__.py +0 -0
  88. {python-amazon-paapi-5.0.0 → python_amazon_paapi-5.1.0}/amazon_paapi/sdk/models/availability.py +0 -0
  89. {python-amazon-paapi-5.0.0 → python_amazon_paapi-5.1.0}/amazon_paapi/sdk/models/browse_node.py +0 -0
  90. {python-amazon-paapi-5.0.0 → python_amazon_paapi-5.1.0}/amazon_paapi/sdk/models/browse_node_ancestor.py +0 -0
  91. {python-amazon-paapi-5.0.0 → python_amazon_paapi-5.1.0}/amazon_paapi/sdk/models/browse_node_child.py +0 -0
  92. {python-amazon-paapi-5.0.0 → python_amazon_paapi-5.1.0}/amazon_paapi/sdk/models/browse_node_info.py +0 -0
  93. {python-amazon-paapi-5.0.0 → python_amazon_paapi-5.1.0}/amazon_paapi/sdk/models/browse_nodes_result.py +0 -0
  94. {python-amazon-paapi-5.0.0 → python_amazon_paapi-5.1.0}/amazon_paapi/sdk/models/by_line_info.py +0 -0
  95. {python-amazon-paapi-5.0.0 → python_amazon_paapi-5.1.0}/amazon_paapi/sdk/models/classifications.py +0 -0
  96. {python-amazon-paapi-5.0.0 → python_amazon_paapi-5.1.0}/amazon_paapi/sdk/models/condition.py +0 -0
  97. {python-amazon-paapi-5.0.0 → python_amazon_paapi-5.1.0}/amazon_paapi/sdk/models/content_info.py +0 -0
  98. {python-amazon-paapi-5.0.0 → python_amazon_paapi-5.1.0}/amazon_paapi/sdk/models/content_rating.py +0 -0
  99. {python-amazon-paapi-5.0.0 → python_amazon_paapi-5.1.0}/amazon_paapi/sdk/models/contributor.py +0 -0
  100. {python-amazon-paapi-5.0.0 → python_amazon_paapi-5.1.0}/amazon_paapi/sdk/models/customer_reviews.py +0 -0
  101. {python-amazon-paapi-5.0.0 → python_amazon_paapi-5.1.0}/amazon_paapi/sdk/models/delivery_flag.py +0 -0
  102. {python-amazon-paapi-5.0.0 → python_amazon_paapi-5.1.0}/amazon_paapi/sdk/models/dimension_based_attribute.py +0 -0
  103. {python-amazon-paapi-5.0.0 → python_amazon_paapi-5.1.0}/amazon_paapi/sdk/models/duration_price.py +0 -0
  104. {python-amazon-paapi-5.0.0 → python_amazon_paapi-5.1.0}/amazon_paapi/sdk/models/error_data.py +0 -0
  105. {python-amazon-paapi-5.0.0 → python_amazon_paapi-5.1.0}/amazon_paapi/sdk/models/external_ids.py +0 -0
  106. {python-amazon-paapi-5.0.0 → python_amazon_paapi-5.1.0}/amazon_paapi/sdk/models/get_browse_nodes_request.py +0 -0
  107. {python-amazon-paapi-5.0.0 → python_amazon_paapi-5.1.0}/amazon_paapi/sdk/models/get_browse_nodes_resource.py +0 -0
  108. {python-amazon-paapi-5.0.0 → python_amazon_paapi-5.1.0}/amazon_paapi/sdk/models/get_browse_nodes_response.py +0 -0
  109. {python-amazon-paapi-5.0.0 → python_amazon_paapi-5.1.0}/amazon_paapi/sdk/models/get_items_request.py +0 -0
  110. {python-amazon-paapi-5.0.0 → python_amazon_paapi-5.1.0}/amazon_paapi/sdk/models/get_items_resource.py +0 -0
  111. {python-amazon-paapi-5.0.0 → python_amazon_paapi-5.1.0}/amazon_paapi/sdk/models/get_items_response.py +0 -0
  112. {python-amazon-paapi-5.0.0 → python_amazon_paapi-5.1.0}/amazon_paapi/sdk/models/get_variations_request.py +0 -0
  113. {python-amazon-paapi-5.0.0 → python_amazon_paapi-5.1.0}/amazon_paapi/sdk/models/get_variations_resource.py +0 -0
  114. {python-amazon-paapi-5.0.0 → python_amazon_paapi-5.1.0}/amazon_paapi/sdk/models/get_variations_response.py +0 -0
  115. {python-amazon-paapi-5.0.0 → python_amazon_paapi-5.1.0}/amazon_paapi/sdk/models/image_size.py +0 -0
  116. {python-amazon-paapi-5.0.0 → python_amazon_paapi-5.1.0}/amazon_paapi/sdk/models/image_type.py +0 -0
  117. {python-amazon-paapi-5.0.0 → python_amazon_paapi-5.1.0}/amazon_paapi/sdk/models/images.py +0 -0
  118. {python-amazon-paapi-5.0.0 → python_amazon_paapi-5.1.0}/amazon_paapi/sdk/models/item.py +0 -0
  119. {python-amazon-paapi-5.0.0 → python_amazon_paapi-5.1.0}/amazon_paapi/sdk/models/item_id_type.py +0 -0
  120. {python-amazon-paapi-5.0.0 → python_amazon_paapi-5.1.0}/amazon_paapi/sdk/models/item_info.py +0 -0
  121. {python-amazon-paapi-5.0.0 → python_amazon_paapi-5.1.0}/amazon_paapi/sdk/models/items_result.py +0 -0
  122. {python-amazon-paapi-5.0.0 → python_amazon_paapi-5.1.0}/amazon_paapi/sdk/models/language_type.py +0 -0
  123. {python-amazon-paapi-5.0.0 → python_amazon_paapi-5.1.0}/amazon_paapi/sdk/models/languages.py +0 -0
  124. {python-amazon-paapi-5.0.0 → python_amazon_paapi-5.1.0}/amazon_paapi/sdk/models/manufacture_info.py +0 -0
  125. {python-amazon-paapi-5.0.0 → python_amazon_paapi-5.1.0}/amazon_paapi/sdk/models/max_price.py +0 -0
  126. {python-amazon-paapi-5.0.0 → python_amazon_paapi-5.1.0}/amazon_paapi/sdk/models/merchant.py +0 -0
  127. {python-amazon-paapi-5.0.0 → python_amazon_paapi-5.1.0}/amazon_paapi/sdk/models/min_price.py +0 -0
  128. {python-amazon-paapi-5.0.0 → python_amazon_paapi-5.1.0}/amazon_paapi/sdk/models/min_reviews_rating.py +0 -0
  129. {python-amazon-paapi-5.0.0 → python_amazon_paapi-5.1.0}/amazon_paapi/sdk/models/min_saving_percent.py +0 -0
  130. {python-amazon-paapi-5.0.0 → python_amazon_paapi-5.1.0}/amazon_paapi/sdk/models/multi_valued_attribute.py +0 -0
  131. {python-amazon-paapi-5.0.0 → python_amazon_paapi-5.1.0}/amazon_paapi/sdk/models/offer_availability.py +0 -0
  132. {python-amazon-paapi-5.0.0 → python_amazon_paapi-5.1.0}/amazon_paapi/sdk/models/offer_condition.py +0 -0
  133. {python-amazon-paapi-5.0.0 → python_amazon_paapi-5.1.0}/amazon_paapi/sdk/models/offer_condition_note.py +0 -0
  134. {python-amazon-paapi-5.0.0 → python_amazon_paapi-5.1.0}/amazon_paapi/sdk/models/offer_count.py +0 -0
  135. {python-amazon-paapi-5.0.0 → python_amazon_paapi-5.1.0}/amazon_paapi/sdk/models/offer_delivery_info.py +0 -0
  136. {python-amazon-paapi-5.0.0 → python_amazon_paapi-5.1.0}/amazon_paapi/sdk/models/offer_listing.py +0 -0
  137. {python-amazon-paapi-5.0.0 → python_amazon_paapi-5.1.0}/amazon_paapi/sdk/models/offer_loyalty_points.py +0 -0
  138. {python-amazon-paapi-5.0.0 → python_amazon_paapi-5.1.0}/amazon_paapi/sdk/models/offer_merchant_info.py +0 -0
  139. {python-amazon-paapi-5.0.0 → python_amazon_paapi-5.1.0}/amazon_paapi/sdk/models/offer_price.py +0 -0
  140. {python-amazon-paapi-5.0.0 → python_amazon_paapi-5.1.0}/amazon_paapi/sdk/models/offer_program_eligibility.py +0 -0
  141. {python-amazon-paapi-5.0.0 → python_amazon_paapi-5.1.0}/amazon_paapi/sdk/models/offer_promotion.py +0 -0
  142. {python-amazon-paapi-5.0.0 → python_amazon_paapi-5.1.0}/amazon_paapi/sdk/models/offer_savings.py +0 -0
  143. {python-amazon-paapi-5.0.0 → python_amazon_paapi-5.1.0}/amazon_paapi/sdk/models/offer_shipping_charge.py +0 -0
  144. {python-amazon-paapi-5.0.0 → python_amazon_paapi-5.1.0}/amazon_paapi/sdk/models/offer_sub_condition.py +0 -0
  145. {python-amazon-paapi-5.0.0 → python_amazon_paapi-5.1.0}/amazon_paapi/sdk/models/offer_summary.py +0 -0
  146. {python-amazon-paapi-5.0.0 → python_amazon_paapi-5.1.0}/amazon_paapi/sdk/models/offers.py +0 -0
  147. {python-amazon-paapi-5.0.0 → python_amazon_paapi-5.1.0}/amazon_paapi/sdk/models/partner_type.py +0 -0
  148. {python-amazon-paapi-5.0.0 → python_amazon_paapi-5.1.0}/amazon_paapi/sdk/models/price.py +0 -0
  149. {python-amazon-paapi-5.0.0 → python_amazon_paapi-5.1.0}/amazon_paapi/sdk/models/price_type.py +0 -0
  150. {python-amazon-paapi-5.0.0 → python_amazon_paapi-5.1.0}/amazon_paapi/sdk/models/product_advertising_api_client_exception.py +0 -0
  151. {python-amazon-paapi-5.0.0 → python_amazon_paapi-5.1.0}/amazon_paapi/sdk/models/product_advertising_api_service_exception.py +0 -0
  152. {python-amazon-paapi-5.0.0 → python_amazon_paapi-5.1.0}/amazon_paapi/sdk/models/product_info.py +0 -0
  153. {python-amazon-paapi-5.0.0 → python_amazon_paapi-5.1.0}/amazon_paapi/sdk/models/properties.py +0 -0
  154. {python-amazon-paapi-5.0.0 → python_amazon_paapi-5.1.0}/amazon_paapi/sdk/models/rating.py +0 -0
  155. {python-amazon-paapi-5.0.0 → python_amazon_paapi-5.1.0}/amazon_paapi/sdk/models/refinement.py +0 -0
  156. {python-amazon-paapi-5.0.0 → python_amazon_paapi-5.1.0}/amazon_paapi/sdk/models/refinement_bin.py +0 -0
  157. {python-amazon-paapi-5.0.0 → python_amazon_paapi-5.1.0}/amazon_paapi/sdk/models/rental_offer_listing.py +0 -0
  158. {python-amazon-paapi-5.0.0 → python_amazon_paapi-5.1.0}/amazon_paapi/sdk/models/rental_offers.py +0 -0
  159. {python-amazon-paapi-5.0.0 → python_amazon_paapi-5.1.0}/amazon_paapi/sdk/models/search_items_request.py +0 -0
  160. {python-amazon-paapi-5.0.0 → python_amazon_paapi-5.1.0}/amazon_paapi/sdk/models/search_items_resource.py +0 -0
  161. {python-amazon-paapi-5.0.0 → python_amazon_paapi-5.1.0}/amazon_paapi/sdk/models/search_items_response.py +0 -0
  162. {python-amazon-paapi-5.0.0 → python_amazon_paapi-5.1.0}/amazon_paapi/sdk/models/search_refinements.py +0 -0
  163. {python-amazon-paapi-5.0.0 → python_amazon_paapi-5.1.0}/amazon_paapi/sdk/models/search_result.py +0 -0
  164. {python-amazon-paapi-5.0.0 → python_amazon_paapi-5.1.0}/amazon_paapi/sdk/models/single_boolean_valued_attribute.py +0 -0
  165. {python-amazon-paapi-5.0.0 → python_amazon_paapi-5.1.0}/amazon_paapi/sdk/models/single_integer_valued_attribute.py +0 -0
  166. {python-amazon-paapi-5.0.0 → python_amazon_paapi-5.1.0}/amazon_paapi/sdk/models/single_string_valued_attribute.py +0 -0
  167. {python-amazon-paapi-5.0.0 → python_amazon_paapi-5.1.0}/amazon_paapi/sdk/models/sort_by.py +0 -0
  168. {python-amazon-paapi-5.0.0 → python_amazon_paapi-5.1.0}/amazon_paapi/sdk/models/technical_info.py +0 -0
  169. {python-amazon-paapi-5.0.0 → python_amazon_paapi-5.1.0}/amazon_paapi/sdk/models/trade_in_info.py +0 -0
  170. {python-amazon-paapi-5.0.0 → python_amazon_paapi-5.1.0}/amazon_paapi/sdk/models/trade_in_price.py +0 -0
  171. {python-amazon-paapi-5.0.0 → python_amazon_paapi-5.1.0}/amazon_paapi/sdk/models/unit_based_attribute.py +0 -0
  172. {python-amazon-paapi-5.0.0 → python_amazon_paapi-5.1.0}/amazon_paapi/sdk/models/variation_attribute.py +0 -0
  173. {python-amazon-paapi-5.0.0 → python_amazon_paapi-5.1.0}/amazon_paapi/sdk/models/variation_dimension.py +0 -0
  174. {python-amazon-paapi-5.0.0 → python_amazon_paapi-5.1.0}/amazon_paapi/sdk/models/variation_summary.py +0 -0
  175. {python-amazon-paapi-5.0.0 → python_amazon_paapi-5.1.0}/amazon_paapi/sdk/models/variations_result.py +0 -0
  176. {python-amazon-paapi-5.0.0 → python_amazon_paapi-5.1.0}/amazon_paapi/sdk/models/website_sales_rank.py +0 -0
  177. {python-amazon-paapi-5.0.0 → python_amazon_paapi-5.1.0}/amazon_paapi/sdk/rest.py +0 -0
@@ -0,0 +1,27 @@
1
+ ---
2
+ trigger: always_on
3
+ ---
4
+
5
+ # General
6
+
7
+ - All code in English
8
+ - Add comments only when needed
9
+ - Add docstrings for every function
10
+ - Use type hints in all functions
11
+ - Use f-strings
12
+ - Follow PEP 8 and clean code principles
13
+ - Imports always at the top
14
+ - Avoid short variable names, abbreviations, or single-letter names
15
+ - Avoid the use of noqa unless strictly necessary
16
+
17
+ # Test
18
+
19
+ - Add tests following TDD practices
20
+ - Mirror the amazon_paapi structure in the tests directory
21
+ - Use unittest.TestCase with setUp() and tearDown()
22
+ - Use unittest assertions, not native assert
23
+ - Use @patch decorators for mocks (avoid context managers)
24
+
25
+ # References
26
+
27
+ - Documentation for the Product Advertising API here: https://webservices.amazon.com/paapi5/documentation/operations.html
@@ -0,0 +1,4 @@
1
+ API_KEY=
2
+ API_SECRET=
3
+ AFFILIATE_TAG=
4
+ COUNTRY_CODE=
@@ -0,0 +1,23 @@
1
+ ---
2
+ name: "\U0001F41B Bug Report"
3
+ about: Report a reproducible bug or regression
4
+ title: 'Bug: '
5
+ labels: bug
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ **Steps to reproduce**
11
+ 1.
12
+ 2.
13
+ 3.
14
+
15
+ **Code example**
16
+ ```python
17
+ "Add some code that helps understanding the issue"
18
+ ```
19
+ **Current behavior**
20
+ A clear and concise description of what is currenctly happening.
21
+
22
+ **Expected behavior**
23
+ A clear and concise description of what you expected to happen.
@@ -0,0 +1,20 @@
1
+ ---
2
+ name: "\U0001F48E Feature request"
3
+ about: Suggest an idea for this project
4
+ title: 'Feature: '
5
+ labels: feature
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ **Is your feature request related to a problem? Please describe.**
11
+ A clear and concise description of what the problem is.
12
+
13
+ **Describe the solution you'd like**
14
+ A clear and concise description of what you want to happen.
15
+
16
+ **Describe alternatives you've considered**
17
+ A clear and concise description of any alternative solutions or features you've considered.
18
+
19
+ **Additional context**
20
+ Add any other context or code about the feature request here.
@@ -0,0 +1,4 @@
1
+ contact_links:
2
+ - name: 🤔 Questions and Help
3
+ url: https://t.me/PythonAmazonPAAPI
4
+ about: This issue tracker is not for support questions. Please refer to our Telegram group for help or use the discussions section.
@@ -0,0 +1,94 @@
1
+ name: Run linters and tests
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - master
7
+ pull_request:
8
+
9
+ permissions:
10
+ pull-requests: read
11
+
12
+ jobs:
13
+ changelog:
14
+ if: github.event_name == 'pull_request'
15
+ runs-on: ubuntu-latest
16
+ steps:
17
+ - uses: actions/checkout@v5
18
+ with:
19
+ fetch-depth: 0
20
+
21
+ - name: Check CHANGELOG was updated
22
+ run: |
23
+ if git diff --name-only origin/${{ github.base_ref }}...HEAD | grep -q "^CHANGELOG.md$"; then
24
+ echo "✅ CHANGELOG.md was updated"
25
+ else
26
+ echo "❌ ERROR: CHANGELOG.md was not updated"
27
+ echo "Please add your changes to the CHANGELOG.md file"
28
+ exit 1
29
+ fi
30
+
31
+ check:
32
+ runs-on: ubuntu-latest
33
+ env:
34
+ API_KEY: ${{ secrets.API_KEY }}
35
+ API_SECRET: ${{ secrets.API_SECRET }}
36
+ AFFILIATE_TAG: ${{ secrets.AFFILIATE_TAG }}
37
+ COUNTRY_CODE: ${{ secrets.COUNTRY_CODE }}
38
+
39
+ steps:
40
+ - uses: actions/checkout@v5
41
+
42
+ - name: Set up Python
43
+ uses: actions/setup-python@v6
44
+ with:
45
+ python-version: "3.13"
46
+
47
+ - name: Install UV
48
+ run: curl -LsSf https://astral.sh/uv/install.sh | sh
49
+
50
+ - name: Cache UV dependencies
51
+ uses: actions/cache@v4
52
+ with:
53
+ path: ~/.cache/uv
54
+ key: ${{ runner.os }}-uv-${{ hashFiles('pyproject.toml') }}
55
+ restore-keys: |
56
+ ${{ runner.os }}-uv-
57
+
58
+ - name: Cache pre-commit
59
+ uses: actions/cache@v4
60
+ with:
61
+ path: ~/.cache/pre-commit
62
+ key: ${{ runner.os }}-pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}
63
+ restore-keys: |
64
+ ${{ runner.os }}-pre-commit-
65
+
66
+ - name: Run all checks
67
+ run: |
68
+ uv run pre-commit run --all-files
69
+
70
+ test:
71
+ runs-on: ubuntu-latest
72
+ timeout-minutes: 2
73
+
74
+ strategy:
75
+ fail-fast: false
76
+ matrix:
77
+ python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14", "3.15"]
78
+
79
+ steps:
80
+ - uses: actions/checkout@v5
81
+
82
+ - name: Install UV
83
+ run: curl -LsSf https://astral.sh/uv/install.sh | sh
84
+
85
+ - name: Cache UV dependencies
86
+ uses: actions/cache@v4
87
+ with:
88
+ path: ~/.cache/uv
89
+ key: ${{ runner.os }}-uv-py${{ matrix.python-version }}-${{ hashFiles('pyproject.toml') }}
90
+ restore-keys: |
91
+ ${{ runner.os }}-uv-py${{ matrix.python-version }}-
92
+
93
+ - name: Run tests
94
+ run: uv run --python "${{ matrix.python-version }}" pytest -rs --no-cov
@@ -0,0 +1,79 @@
1
+ name: Create Release and Publish
2
+
3
+ on:
4
+ workflow_dispatch:
5
+
6
+ permissions:
7
+ contents: write
8
+ id-token: write
9
+
10
+ jobs:
11
+ release:
12
+ runs-on: ubuntu-latest
13
+ if: github.ref == 'refs/heads/master'
14
+ environment: pypi
15
+ outputs:
16
+ version: ${{ steps.changelog.outputs.version }}
17
+ released: ${{ steps.check_tag.outputs.exists == 'false' }}
18
+
19
+ steps:
20
+ - name: Checkout code
21
+ uses: actions/checkout@v5
22
+
23
+ - name: Extract version and notes from CHANGELOG
24
+ id: changelog
25
+ run: |
26
+ # Extract version from first ## [x.x.x] header
27
+ VERSION=$(grep -m1 -oP '## \[\K[0-9]+\.[0-9]+\.[0-9]+' CHANGELOG.md)
28
+ echo "version=$VERSION" >> $GITHUB_OUTPUT
29
+
30
+ # Extract release notes (content between first and second ## headers)
31
+ NOTES=$(awk '/^## \['"$VERSION"'\]/{flag=1; next} /^## \[/{flag=0} flag' CHANGELOG.md)
32
+
33
+ # Handle multiline output
34
+ {
35
+ echo "notes<<EOF"
36
+ echo "$NOTES"
37
+ echo "EOF"
38
+ } >> $GITHUB_OUTPUT
39
+
40
+ - name: Check if tag already exists
41
+ id: check_tag
42
+ run: |
43
+ if git rev-parse "v${{ steps.changelog.outputs.version }}" >/dev/null 2>&1; then
44
+ echo "exists=true" >> $GITHUB_OUTPUT
45
+ else
46
+ echo "exists=false" >> $GITHUB_OUTPUT
47
+ fi
48
+
49
+ - name: Create Release
50
+ if: steps.check_tag.outputs.exists == 'false'
51
+ uses: softprops/action-gh-release@v2
52
+ with:
53
+ tag_name: ${{ steps.changelog.outputs.version }}
54
+ name: v${{ steps.changelog.outputs.version }}
55
+ body: ${{ steps.changelog.outputs.notes }}
56
+ draft: false
57
+ prerelease: false
58
+
59
+ - name: Skip release (tag exists)
60
+ if: steps.check_tag.outputs.exists == 'true'
61
+ run: |
62
+ echo "⚠️ Tag v${{ steps.changelog.outputs.version }} already exists. Skipping release creation."
63
+ exit 1
64
+
65
+ - name: Set up Python
66
+ uses: actions/setup-python@v5
67
+ with:
68
+ python-version: "3.x"
69
+
70
+ - name: Install dependencies
71
+ run: |
72
+ python -m pip install --upgrade pip
73
+ pip install build
74
+
75
+ - name: Build package
76
+ run: python -m build
77
+
78
+ - name: Publish to PyPI
79
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,110 @@
1
+ # Custom folders and files to ignore
2
+ .vscode/
3
+ .DS_Store
4
+ coverage_html_report
5
+
6
+ # Byte-compiled / optimized / DLL files
7
+ __pycache__/
8
+ *.py[cod]
9
+ *$py.class
10
+
11
+ # C extensions
12
+ *.so
13
+
14
+ # Distribution / packaging
15
+ .Python
16
+ build/
17
+ develop-eggs/
18
+ dist/
19
+ downloads/
20
+ eggs/
21
+ .eggs/
22
+ lib/
23
+ lib64/
24
+ parts/
25
+ sdist/
26
+ var/
27
+ wheels/
28
+ *.egg-info/
29
+ .installed.cfg
30
+ *.egg
31
+ MANIFEST
32
+ uv.lock
33
+
34
+ # PyInstaller
35
+ # Usually these files are written by a python script from a template
36
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
37
+ *.manifest
38
+ *.spec
39
+
40
+ # Installer logs
41
+ pip-log.txt
42
+ pip-delete-this-directory.txt
43
+
44
+ # Unit test / coverage reports
45
+ htmlcov/
46
+ .tox/
47
+ .coverage
48
+ .coverage.*
49
+ .cache
50
+ nosetests.xml
51
+ coverage.xml
52
+ *.cover
53
+ .hypothesis/
54
+ .pytest_cache/
55
+
56
+ # Translations
57
+ *.mo
58
+ *.pot
59
+
60
+ # Django stuff:
61
+ *.log
62
+ local_settings.py
63
+ db.sqlite3
64
+
65
+ # Flask stuff:
66
+ instance/
67
+ .webassets-cache
68
+
69
+ # Scrapy stuff:
70
+ .scrapy
71
+
72
+ # Sphinx documentation
73
+ docs/_build/
74
+
75
+ # PyBuilder
76
+ target/
77
+
78
+ # Jupyter Notebook
79
+ .ipynb_checkpoints
80
+
81
+ # pyenv
82
+ .python-version
83
+
84
+ # celery beat schedule file
85
+ celerybeat-schedule
86
+
87
+ # SageMath parsed files
88
+ *.sage.py
89
+
90
+ # Environments
91
+ .env
92
+ .venv
93
+ env/
94
+ venv/
95
+ ENV/
96
+ env.bak/
97
+ venv.bak/
98
+
99
+ # Spyder project settings
100
+ .spyderproject
101
+ .spyproject
102
+
103
+ # Rope project settings
104
+ .ropeproject
105
+
106
+ # mkdocs documentation
107
+ /site
108
+
109
+ # mypy
110
+ .mypy_cache/
@@ -0,0 +1,61 @@
1
+ # See https://pre-commit.com for more information
2
+ # See https://pre-commit.com/hooks.html for more hooks
3
+ default_language_version:
4
+ python: python3.13
5
+
6
+ repos:
7
+ - repo: https://github.com/astral-sh/ruff-pre-commit
8
+ rev: v0.14.11
9
+ hooks:
10
+ - id: ruff-format
11
+ - id: ruff-check
12
+ args: [--fix, --exit-non-zero-on-fix]
13
+
14
+ - repo: https://github.com/pre-commit/pre-commit-hooks
15
+ rev: v6.0.0
16
+ hooks:
17
+ - id: trailing-whitespace
18
+ - id: end-of-file-fixer
19
+ - id: mixed-line-ending
20
+ - id: check-yaml
21
+ - id: check-added-large-files
22
+ - id: check-ast
23
+ - id: check-executables-have-shebangs
24
+ - id: check-shebang-scripts-are-executable
25
+ - id: check-toml
26
+ - id: check-merge-conflict
27
+ - id: debug-statements
28
+ - id: name-tests-test
29
+
30
+ - repo: https://github.com/lk16/detect-missing-init
31
+ rev: v0.1.6
32
+ hooks:
33
+ - id: detect-missing-init
34
+ args: ["--create", "--python-folders", "amazon_paapi"]
35
+
36
+ - repo: https://github.com/gitleaks/gitleaks
37
+ rev: v8.30.0
38
+ hooks:
39
+ - id: gitleaks
40
+
41
+ - repo: https://github.com/pre-commit/mirrors-mypy
42
+ rev: "v1.19.1"
43
+ hooks:
44
+ - id: mypy
45
+ exclude: sdk/
46
+
47
+ - repo: local
48
+ hooks:
49
+ - id: test
50
+ name: Running tests
51
+ language: system
52
+ entry: "bash -c 'set -a && source .env 2>/dev/null; set +a && uv run pytest -rs --cov=amazon_paapi'"
53
+ types_or: [python]
54
+ pass_filenames: false
55
+
56
+ - id: version-check
57
+ name: Check version consistency
58
+ language: system
59
+ entry: uv run python scripts/check_version.py
60
+ files: (CHANGELOG\.md|pyproject\.toml|docs/conf\.py)$
61
+ pass_filenames: false
@@ -0,0 +1,21 @@
1
+ # Read the Docs configuration file
2
+ # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
3
+
4
+ version: 2
5
+
6
+ build:
7
+ os: ubuntu-24.04
8
+ tools:
9
+ python: "3.12"
10
+
11
+ sphinx:
12
+ configuration: docs/conf.py
13
+
14
+ formats:
15
+ - pdf
16
+
17
+ python:
18
+ install:
19
+ - method: pip
20
+ path: .
21
+ - requirements: docs/requirements.txt
@@ -0,0 +1,42 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [5.1.0] - 2026-01-11
9
+
10
+ ### Added
11
+
12
+ - Integration tests with real Amazon API calls
13
+ - Type hints throughout the codebase using `Literal` types for country codes
14
+ - `.env.template` file for easier development setup
15
+ - Code style guide for AI assistants (`.agent/rules/code-style-guide.md`)
16
+ - Pre-commit hooks with Ruff integration
17
+ - Version consistency check script (`scripts/check_version.py`)
18
+ - Manual release workflow (`release.yml`) that creates GitHub releases from CHANGELOG
19
+ - CI check to ensure CHANGELOG is updated in every PR
20
+
21
+ ### Changed
22
+
23
+ - **BREAKING**: Minimum Python version raised from 3.7 to 3.9
24
+ - Migrated from `setup.py` to `pyproject.toml` for project configuration
25
+ - Replaced multiple linters (Flake8, isort, Black, Pylint) with Ruff
26
+ - Replaced Docker-based development environment with `uv` package manager
27
+ - Consolidated coverage, mypy, and pytest configuration into `pyproject.toml`
28
+ - Renamed test files to use `_test.py` suffix instead of `test_` prefix
29
+ - Updated GitHub Actions workflows to use `uv` instead of Docker
30
+ - Improved docstrings across the codebase
31
+ - Completely rewritten README with clearer structure and examples
32
+ - Updated Read the Docs configuration to v2 format with modern Sphinx versions
33
+ - Updated documentation to furo theme
34
+
35
+ ### Removed
36
+
37
+ - `setup.py` - replaced by `pyproject.toml`
38
+ - `.coveragerc` - configuration moved to `pyproject.toml`
39
+ - `.flake8` - replaced by Ruff configuration in `pyproject.toml`
40
+ - Docker development environment (`docker/`, `docker-compose.yml`)
41
+ - Legacy shell scripts (`scripts/` directory)
42
+ - Custom git hooks (`.githooks/`) - replaced by pre-commit
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2020 Sergio Abad
3
+ Copyright (c) 2026 Sergio Abad
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -0,0 +1,29 @@
1
+ export UID:=$(shell id -u)
2
+ export GID:=$(shell id -g)
3
+
4
+ export PYTHON_TAGS = 3.9 3.10 3.11 3.12 3.13 3.14 3.15
5
+
6
+ setup:
7
+ @uv run pre-commit install
8
+
9
+ test:
10
+ @touch .env
11
+ @uv run --env-file .env pytest -rs
12
+
13
+ coverage:
14
+ @uv run pytest -rs --cov=amazon_paapi --cov-report=html --cov-report=term --cov-report=xml
15
+
16
+ test-all-python-tags:
17
+ @touch .env
18
+ @for tag in $$PYTHON_TAGS; do \
19
+ uv run --env-file .env --python "$$tag" pytest -rs --no-cov; \
20
+ done
21
+
22
+ lint:
23
+ @uv run ruff check --fix .
24
+
25
+ mypy:
26
+ @uv run mypy .
27
+
28
+ pre-commit:
29
+ @uv run pre-commit run -a
@@ -0,0 +1,160 @@
1
+ Metadata-Version: 2.4
2
+ Name: python-amazon-paapi
3
+ Version: 5.1.0
4
+ Summary: Amazon Product Advertising API 5.0 wrapper for Python
5
+ Project-URL: Homepage, https://github.com/sergioteula/python-amazon-paapi
6
+ Project-URL: Repository, https://github.com/sergioteula/python-amazon-paapi
7
+ Author-email: Sergio Abad <sergio.abad@bytelix.com>
8
+ License-Expression: MIT
9
+ License-File: LICENSE
10
+ Keywords: affiliate,amazon,api,paapi,product-advertising-api
11
+ Classifier: Development Status :: 5 - Production/Stable
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: License :: OSI Approved :: MIT License
14
+ Classifier: Operating System :: OS Independent
15
+ Classifier: Programming Language :: Python
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3.9
18
+ Classifier: Programming Language :: Python :: 3.10
19
+ Classifier: Programming Language :: Python :: 3.11
20
+ Classifier: Programming Language :: Python :: 3.12
21
+ Classifier: Programming Language :: Python :: 3.13
22
+ Classifier: Programming Language :: Python :: 3.14
23
+ Classifier: Programming Language :: Python :: 3.15
24
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
25
+ Requires-Python: >=3.9
26
+ Requires-Dist: certifi>=2023.0.0
27
+ Requires-Dist: python-dateutil>=2.8.0
28
+ Requires-Dist: six>=1.16.0
29
+ Requires-Dist: urllib3<3,>=1.26.0
30
+ Description-Content-Type: text/markdown
31
+
32
+ # Python Amazon PAAPI
33
+
34
+ A simple Python wrapper for the [Amazon Product Advertising API 5.0](https://webservices.amazon.com/paapi5/documentation/). Easily interact with Amazon's official API to retrieve product information, search for items, and more.
35
+
36
+ [![PyPI](https://img.shields.io/pypi/v/python-amazon-paapi?color=%231182C2&label=PyPI)](https://pypi.org/project/python-amazon-paapi/)
37
+ [![Python](https://img.shields.io/badge/Python-≥3.9-%23FFD140)](https://www.python.org/)
38
+ [![License](https://img.shields.io/badge/License-MIT-%23e83633)](https://github.com/sergioteula/python-amazon-paapi/blob/master/LICENSE)
39
+ [![Amazon API](https://img.shields.io/badge/Amazon%20API-5.0-%23FD9B15)](https://webservices.amazon.com/paapi5/documentation/)
40
+ [![Downloads](https://img.shields.io/pypi/dm/python-amazon-paapi?label=Downloads)](https://pypi.org/project/python-amazon-paapi/)
41
+
42
+ ## Features
43
+
44
+ - 🎯 **Simple object-oriented interface** for easy integration
45
+ - 🔍 **Product search** by keywords, categories, or browse nodes
46
+ - 📦 **Product details** via ASIN or Amazon URL
47
+ - 🔄 **Item variations** support (size, color, etc.)
48
+ - 🌍 **20+ countries** supported ([full list](https://github.com/sergioteula/python-amazon-paapi/blob/master/amazon_paapi/models/regions.py))
49
+ - ⚡ **Batch requests** to get multiple items without the 10-item limit
50
+ - 🛡️ **Built-in throttling** to avoid API rate limits
51
+ - 📝 **Full type hints** for better IDE support
52
+
53
+ ## Installation
54
+
55
+ ```bash
56
+ pip install python-amazon-paapi --upgrade
57
+ ```
58
+
59
+ ## Quick Start
60
+
61
+ ```python
62
+ from amazon_paapi import AmazonApi
63
+
64
+ # Initialize the API (get credentials from Amazon Associates)
65
+ amazon = AmazonApi(KEY, SECRET, TAG, COUNTRY)
66
+
67
+ # Get product information by ASIN
68
+ item = amazon.get_items('B01N5IB20Q')[0]
69
+ print(item.item_info.title.display_value)
70
+ ```
71
+
72
+ ## Usage Examples
73
+
74
+ ### Get Multiple Products
75
+
76
+ ```python
77
+ items = amazon.get_items(['B01N5IB20Q', 'B01F9G43WU'])
78
+ for item in items:
79
+ print(item.images.primary.large.url)
80
+ print(item.offers.listings[0].price.amount)
81
+ ```
82
+
83
+ ### Use Amazon URL Instead of ASIN
84
+
85
+ ```python
86
+ item = amazon.get_items('https://www.amazon.com/dp/B01N5IB20Q')
87
+ ```
88
+
89
+ ### Search Products
90
+
91
+ ```python
92
+ results = amazon.search_items(keywords='nintendo switch')
93
+ for item in results.items:
94
+ print(item.item_info.title.display_value)
95
+ ```
96
+
97
+ ### Get Product Variations
98
+
99
+ ```python
100
+ variations = amazon.get_variations('B01N5IB20Q')
101
+ for item in variations.items:
102
+ print(item.detail_page_url)
103
+ ```
104
+
105
+ ### Get Browse Node Information
106
+
107
+ ```python
108
+ nodes = amazon.get_browse_nodes(['667049031', '599385031'])
109
+ for node in nodes:
110
+ print(node.display_name)
111
+ ```
112
+
113
+ ### Extract ASIN from URL
114
+
115
+ ```python
116
+ from amazon_paapi import get_asin
117
+
118
+ asin = get_asin('https://www.amazon.com/dp/B01N5IB20Q')
119
+ # Returns: 'B01N5IB20Q'
120
+ ```
121
+
122
+ ### Configure Throttling
123
+
124
+ Control the wait time between API calls to avoid rate limits:
125
+
126
+ ```python
127
+ # Wait 4 seconds between requests
128
+ amazon = AmazonApi(KEY, SECRET, TAG, COUNTRY, throttling=4)
129
+
130
+ # No throttling (use with caution)
131
+ amazon = AmazonApi(KEY, SECRET, TAG, COUNTRY, throttling=0)
132
+ ```
133
+
134
+ ## Documentation
135
+
136
+ - 📖 [Full Documentation](https://python-amazon-paapi.readthedocs.io/)
137
+ - 📋 [Changelog](https://github.com/sergioteula/python-amazon-paapi/blob/master/CHANGELOG.md)
138
+ - 💬 [Telegram Support Group](https://t.me/PythonAmazonPAAPI)
139
+
140
+ ## Contributing
141
+
142
+ Contributions are welcome! To get started:
143
+
144
+ 1. Install [uv](https://docs.astral.sh/uv/) package manager
145
+ 2. Clone and set up the project:
146
+
147
+ ```bash
148
+ git clone https://github.com/sergioteula/python-amazon-paapi.git
149
+ cd python-amazon-paapi
150
+ uv sync
151
+ uv run pre-commit install
152
+ ```
153
+
154
+ 3. Copy `.env.template` to `.env` and add your Amazon API credentials for integration tests.
155
+
156
+ Pre-commit hooks will automatically run Ruff, mypy, and tests before each commit.
157
+
158
+ ## License
159
+
160
+ MIT License © 2026 [Sergio Abad](https://github.com/sergioteula)