From 628dddf0b6f11a97bdb00207f10e6dff3710ec12 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 9 Apr 2024 14:10:29 -0600 Subject: [PATCH 1/3] [pre-commit.ci] pre-commit autoupdate (#174) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/astral-sh/ruff-pre-commit: v0.3.4 → v0.3.5](https://github.com/astral-sh/ruff-pre-commit/compare/v0.3.4...v0.3.5) - [github.com/pre-commit/pre-commit-hooks: v4.5.0 → v4.6.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.5.0...v4.6.0) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 4b8975c..7d19965 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,7 +9,7 @@ repos: - id: blackdoc files: '\.py$' - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.3.4 + rev: v0.3.5 hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] @@ -32,7 +32,7 @@ repos: - id: pyupgrade args: [--py38-plus, --keep-runtime-typing] - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.5.0 + rev: v4.6.0 hooks: - id: check-merge-conflict - id: debug-statements From 2c78d5c33213d1b240374920042e00c7febea503 Mon Sep 17 00:00:00 2001 From: Alex Kaszynski Date: Wed, 10 Jul 2024 12:39:28 -0600 Subject: [PATCH 2/3] Update pre-commit and add initial type hints (#177) * update pre-commit * add typing; fix product for tests --- .pre-commit-config.yaml | 6 +- pyproject.toml | 2 + src/keepa/interface.py | 255 +++++++++++++++++----------------- src/keepa/py.typed | 1 + tests/test_async_interface.py | 5 +- tests/test_interface.py | 7 +- 6 files changed, 137 insertions(+), 139 deletions(-) create mode 100644 src/keepa/py.typed diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7d19965..8c94ace 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,14 +9,14 @@ repos: - id: blackdoc files: '\.py$' - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.3.5 + rev: v0.5.1 hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] exclude: ^(docs/|tests) - id: ruff-format - repo: https://github.com/codespell-project/codespell - rev: v2.2.6 + rev: v2.3.0 hooks: - id: codespell args: [-S ./docs/\*] @@ -27,7 +27,7 @@ repos: additional_dependencies: [toml] exclude: "tests/" - repo: https://github.com/asottile/pyupgrade - rev: v3.15.2 + rev: v3.16.0 hooks: - id: pyupgrade args: [--py38-plus, --keep-runtime-typing] diff --git a/pyproject.toml b/pyproject.toml index 7fcf797..2d1ceec 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -60,5 +60,7 @@ combine_as_imports = true [tool.ruff] line-length = 100 + +[tool.ruff.lint] select = ["E", "F", "W", "I001"] # pyflakes, pycodestyle, isort ignore = [] \ No newline at end of file diff --git a/src/keepa/interface.py b/src/keepa/interface.py index 65cd22c..1d22ea1 100644 --- a/src/keepa/interface.py +++ b/src/keepa/interface.py @@ -5,7 +5,7 @@ import json import logging import time -from typing import List +from typing import Any, Dict, List, Optional, Sequence, Tuple, Union import aiohttp import numpy as np @@ -51,46 +51,46 @@ def wrapper(target): # https://github.com/keepacom/api_backend # see api_backend/src/main/java/com/keepa/api/backend/structs/Product.java # [index in csv, key name, isfloat(is price or rating)] -csv_indices = [ - [0, "AMAZON", True], - [1, "NEW", True], - [2, "USED", True], - [3, "SALES", False], - [4, "LISTPRICE", True], - [5, "COLLECTIBLE", True], - [6, "REFURBISHED", True], - [7, "NEW_FBM_SHIPPING", True], - [8, "LIGHTNING_DEAL", True], - [9, "WAREHOUSE", True], - [10, "NEW_FBA", True], - [11, "COUNT_NEW", False], - [12, "COUNT_USED", False], - [13, "COUNT_REFURBISHED", False], - [14, "CollectableOffers", False], - [15, "EXTRA_INFO_UPDATES", False], - [16, "RATING", True], - [17, "COUNT_REVIEWS", False], - [18, "BUY_BOX_SHIPPING", True], - [19, "USED_NEW_SHIPPING", True], - [20, "USED_VERY_GOOD_SHIPPING", True], - [21, "USED_GOOD_SHIPPING", True], - [22, "USED_ACCEPTABLE_SHIPPING", True], - [23, "COLLECTIBLE_NEW_SHIPPING", True], - [24, "COLLECTIBLE_VERY_GOOD_SHIPPING", True], - [25, "COLLECTIBLE_GOOD_SHIPPING", True], - [26, "COLLECTIBLE_ACCEPTABLE_SHIPPING", True], - [27, "REFURBISHED_SHIPPING", True], - [28, "EBAY_NEW_SHIPPING", True], - [29, "EBAY_USED_SHIPPING", True], - [30, "TRADE_IN", True], - [31, "RENT", False], +csv_indices: List[Tuple[int, str, bool]] = [ + (0, "AMAZON", True), + (1, "NEW", True), + (2, "USED", True), + (3, "SALES", False), + (4, "LISTPRICE", True), + (5, "COLLECTIBLE", True), + (6, "REFURBISHED", True), + (7, "NEW_FBM_SHIPPING", True), + (8, "LIGHTNING_DEAL", True), + (9, "WAREHOUSE", True), + (10, "NEW_FBA", True), + (11, "COUNT_NEW", False), + (12, "COUNT_USED", False), + (13, "COUNT_REFURBISHED", False), + (14, "CollectableOffers", False), + (15, "EXTRA_INFO_UPDATES", False), + (16, "RATING", True), + (17, "COUNT_REVIEWS", False), + (18, "BUY_BOX_SHIPPING", True), + (19, "USED_NEW_SHIPPING", True), + (20, "USED_VERY_GOOD_SHIPPING", True), + (21, "USED_GOOD_SHIPPING", True), + (22, "USED_ACCEPTABLE_SHIPPING", True), + (23, "COLLECTIBLE_NEW_SHIPPING", True), + (24, "COLLECTIBLE_VERY_GOOD_SHIPPING", True), + (25, "COLLECTIBLE_GOOD_SHIPPING", True), + (26, "COLLECTIBLE_ACCEPTABLE_SHIPPING", True), + (27, "REFURBISHED_SHIPPING", True), + (28, "EBAY_NEW_SHIPPING", True), + (29, "EBAY_USED_SHIPPING", True), + (30, "TRADE_IN", True), + (31, "RENT", False), ] -def _parse_stats(stats, to_datetime): +def _parse_stats(stats: Dict[str, Union[None, int, List[int]]], to_datetime: bool): """Parse numeric stats object. - There is no need to parse strings or list of strings. Keepa stats object + There is no need to parse strings or list of strings. Keepa stats object response documentation: https://keepa.com/#!discuss/t/statistics-object/1308 """ @@ -348,14 +348,12 @@ class Keepa: ---------- accesskey : str 64 character access key string. - timeout : float, optional Default timeout when issuing any request. This is not a time limit on the entire response download; rather, an exception is raised if the server has not issued a response for timeout seconds. Setting this to 0 disables the timeout, but will cause any request to hang indefiantly should keepa.com be down - logging_level: string, optional Logging level to use. Default is 'DEBUG'. Other options are 'INFO', 'WARNING', 'ERROR', and 'CRITICAL'. @@ -392,10 +390,9 @@ class Keepa: """ - def __init__(self, accesskey, timeout=10, logging_level="DEBUG"): + def __init__(self, accesskey: str, timeout: float = 10.0, logging_level: str = "DEBUG"): """Initialize server connection.""" self.accesskey = accesskey - self.status = None self.tokens_left = 0 self._timeout = timeout @@ -406,7 +403,7 @@ def __init__(self, accesskey, timeout=10, logging_level="DEBUG"): log.setLevel(logging_level) # Store user's available tokens log.info("Connecting to keepa using key ending in %s", accesskey[-6:]) - self.update_status() + self.status = self.update_status() log.info("%d tokens remain", self.tokens_left) @property @@ -441,11 +438,13 @@ def time_to_refill(self) -> float: # Return value in seconds return timetorefil / 1000.0 - def update_status(self): + def update_status(self) -> Dict[str, Any]: """Update available tokens.""" - self.status = self._request("token", {"key": self.accesskey}, wait=False) + status = self._request("token", {"key": self.accesskey}, wait=False) + self.status = status + return status - def wait_for_tokens(self): + def wait_for_tokens(self) -> None: """Check if there are any remaining tokens and waits if none are available.""" self.update_status() @@ -458,24 +457,24 @@ def wait_for_tokens(self): def query( self, - items, - stats=None, - domain="US", - history=True, - offers=None, - update=None, - to_datetime=True, - rating=False, - out_of_stock_as_nan=True, - stock=False, - product_code_is_asin=True, - progress_bar=True, - buybox=False, - wait=True, - days=None, - only_live_offers=None, - raw=False, - ): + items: Union[str, Sequence[str]], + stats: Optional[Union[int]] = None, + domain: str = "US", + history: bool = True, + offers: Optional[int] = None, + update: Optional[int] = None, + to_datetime: bool = True, + rating: bool = False, + out_of_stock_as_nan: bool = True, + stock: bool = False, + product_code_is_asin: bool = True, + progress_bar: bool = True, + buybox: bool = False, + wait: bool = True, + days: Optional[int] = None, + only_live_offers: Optional[bool] = None, + raw: bool = False, + ) -> List[Dict[str, Any]]: """Perform a product query of a list, array, or single ASIN. Returns a list of product data with one entry for each @@ -483,12 +482,12 @@ def query( Parameters ---------- - items : str, list, np.ndarray - A list, array, or single asin, UPC, EAN, or ISBN-13 - identifying a product. ASINs should be 10 characters and - match a product on Amazon. Items not matching Amazon - product or duplicate Items will return no data. When - using non-ASIN items, set product_code_is_asin to False + items : str, Sequence[str] + A list, array, or single asin, UPC, EAN, or ISBN-13 identifying a + product. ASINs should be 10 characters and match a product on + Amazon. Items not matching Amazon product or duplicate Items will + return no data. When using non-ASIN items, set + ``product_code_is_asin`` to ``False``. stats : int or date, optional No extra token cost. If specified the product object will @@ -510,34 +509,32 @@ def query( One of the following Amazon domains: RESERVED, US, GB, DE, FR, JP, CA, CN, IT, ES, IN, MX, BR. - offers : int, optional - Adds available offers to product data. Default 0. Must be between - 20 and 100. Enabling this also enables the ``"buyBoxUsedHistory"``. - - update : int, optional - if data is older than the input integer, keepa will - update their database and return live data. If set to 0 - (live data), request may cost an additional token. - Default None - history : bool, optional When set to True includes the price, sales, and offer history of a product. Set to False to reduce request time if data is not required. Default True - rating : bool, optional - When set to to True, includes the existing RATING and - COUNT_REVIEWS history of the csv field. Default False + offers : int, optional + Adds available offers to product data. Default 0. Must be between + 20 and 100. Enabling this also enables the ``"buyBoxUsedHistory"``. + + update : int, optional + If data is older than the input integer, keepa will update their + database and return live data. If set to 0 (live data), request may + cost an additional token. Default (``None``) will not update. - to_datetime : bool, optional + to_datetime : bool, default: True Modifies numpy minutes to datetime.datetime values. - Default True. - out_of_stock_as_nan : bool, optional + rating : bool, default: False + When set to to True, includes the existing RATING and + COUNT_REVIEWS history of the csv field. + + out_of_stock_as_nan : bool, default: True When True, prices are NAN when price category is out of - stock. When False, prices are -0.01 Default True + stock. When False, prices are -0.01. - stock : bool, optional + stock : bool, default: False Can only be used if the offers parameter is also True. If True, the stock will be collected for all retrieved live offers. Note: We can only determine stock up 10 qty. Stock @@ -545,14 +542,13 @@ def query( take longer. Existing stock history will be included whether or not the stock parameter is used. - product_code_is_asin : bool, optional + product_code_is_asin : bool, default: True The type of product code you are requesting. True when product code is an ASIN, an Amazon standard identification number, or 'code', for UPC, EAN, or ISBN-13 codes. - progress_bar : bool, optional - Display a progress bar using ``tqdm``. Defaults to - ``True``. + progress_bar : bool, default: True + Display a progress bar using ``tqdm``. buybox : bool, optional Additional token cost: 2 per product). When true the @@ -569,35 +565,32 @@ def query( data. To access the statistics object the stats parameter is required. - wait : bool, optional - Wait available token before doing effective query, - Defaults to ``True``. + wait : bool, default: True + Wait available token before doing effective query. only_live_offers : bool, optional If set to True, the product object will only include live marketplace offers (when used in combination with the - offers parameter). If you do not need historical offers + offers parameter). If you do not need historical offers use this to have them removed from the response. This can improve processing time and considerably decrease the size - of the response. Default None + of the response. days : int, optional - Any positive integer value. If specified and has positive - value X the product object will limit all historical data - to the recent X days. This includes the csv, - buyBoxSellerIdHistory, salesRanks, offers and - offers.offerCSV fields. If you do not need old historical - data use this to have it removed from the response. This - can improve processing time and considerably decrease the - size of the response. The parameter does not use calendar - days - so 1 day equals the last 24 hours. The oldest data - point of each field may have a date value which is out of - the specified range. This means the value of the field has - not changed since that date and is still active. Default - ``None`` - - raw : bool, optional - When ``True``, return the raw request response. This is + Any positive integer value. If specified and has positive value X + the product object will limit all historical data to the recent X + days. This includes the csv, buyBoxSellerIdHistory, salesRanks, + offers and offers.offerCSV fields. If you do not need old + historical data use this to have it removed from the response. This + can improve processing time and considerably decrease the size of + the response. The parameter does not use calendar days - so 1 day + equals the last 24 hours. The oldest data point of each field may + have a date value which is out of the specified range. This means + the value of the field has not changed since that date and is still + active. + + raw : bool, default; False + When ``True``, return the raw request response. This is only available in the non-async class. Returns @@ -2568,8 +2561,8 @@ def deals(self, deal_parms, domain="US", wait=True) -> dict: def _request(self, request_type, payload, wait=True, raw_response=False): """Query keepa api server. - Parses raw response from keepa into a json format. Handles - errors and waits for available tokens if allowed. + Parses raw response from keepa into a json format. Handles errors and + waits for available tokens if allowed. """ if wait: self.wait_for_tokens() @@ -2714,30 +2707,30 @@ async def wait_for_tokens(self): # Wait if no tokens available if self.tokens_left <= 0: tdelay = self.time_to_refill - log.warning("Waiting %.0f seconds for additional tokens" % tdelay) + log.warning("Waiting %.0f seconds for additional tokens", tdelay) await asyncio.sleep(tdelay) await self.update_status() @is_documented_by(Keepa.query) async def query( self, - items, - stats=None, - domain="US", - history=True, - offers=None, - update=None, - to_datetime=True, - rating=False, - out_of_stock_as_nan=True, - stock=False, - product_code_is_asin=True, - progress_bar=True, - buybox=False, - wait=True, - days=None, - only_live_offers=None, - raw=False, + items: Union[str, Sequence[str]], + stats: Optional[Union[int]] = None, + domain: str = "US", + history: bool = True, + offers: Optional[int] = None, + update: Optional[int] = None, + to_datetime: bool = True, + rating: bool = False, + out_of_stock_as_nan: bool = True, + stock: bool = False, + product_code_is_asin: bool = True, + progress_bar: bool = True, + buybox: bool = False, + wait: bool = True, + days: Optional[int] = None, + only_live_offers: Optional[bool] = None, + raw: bool = False, ): """Documented in Keepa.query.""" if raw: diff --git a/src/keepa/py.typed b/src/keepa/py.typed new file mode 100644 index 0000000..5fcb852 --- /dev/null +++ b/src/keepa/py.typed @@ -0,0 +1 @@ +partial \ No newline at end of file diff --git a/tests/test_async_interface.py b/tests/test_async_interface.py index 0c5322f..7126a1e 100644 --- a/tests/test_async_interface.py +++ b/tests/test_async_interface.py @@ -26,8 +26,9 @@ TESTINGKEY = os.environ["KEEPAKEY"] WEAKTESTINGKEY = os.environ["WEAKKEEPAKEY"] -# The Great Gatsby: The Original 1925 Edition (F. Scott Fitzgerald Classics) -PRODUCT_ASIN = "B09X6JCFF5" +# Dead Man's Hand (The Unorthodox Chronicles) +# just need an active product with a buybox +PRODUCT_ASIN = "0593440412" HARD_DRIVE_PRODUCT_ASIN = "B0088PUEPK" # ASINs of a bunch of chairs diff --git a/tests/test_interface.py b/tests/test_interface.py index 0e96ddd..e48fd56 100644 --- a/tests/test_interface.py +++ b/tests/test_interface.py @@ -29,8 +29,9 @@ TESTINGKEY = os.environ["KEEPAKEY"] WEAKTESTINGKEY = os.environ["WEAKKEEPAKEY"] -# The Great Gatsby: The Original 1925 Edition (F. Scott Fitzgerald Classics) -PRODUCT_ASIN = "B09X6JCFF5" +# Dead Man's Hand (The Unorthodox Chronicles) +# just need an active product with a buybox +PRODUCT_ASIN = "0593440412" HARD_DRIVE_PRODUCT_ASIN = "B0088PUEPK" # ASINs of a bunch of chairs generated with @@ -178,7 +179,7 @@ def test_isbn13(api): api.query(isbn13, product_code_is_asin=False, history=False) -def test_buybox(api): +def test_buybox(api: keepa.Keepa) -> None: request = api.query(PRODUCT_ASIN, history=True, buybox=True) product = request[0] assert "BUY_BOX_SHIPPING" in product["data"] From 7dbcb2276cc8f5089a678e576a358e4775c5164f Mon Sep 17 00:00:00 2001 From: Alex Kaszynski Date: Wed, 10 Jul 2024 14:24:27 -0600 Subject: [PATCH 3/3] update product params (#178) --- .github/workflows/testing-and-deployment.yml | 100 +- .pre-commit-config.yaml | 21 +- .readthedocs.yaml | 12 +- codecov.yml | 30 +- docs/source/api_methods.rst | 16 + docs/source/conf.py | 13 +- pyproject.toml | 84 +- requirements_docs.txt | 4 +- src/keepa/__init__.py | 24 +- src/keepa/data_models.py | 1131 ++++++++++++++++ src/keepa/interface.py | 1245 ++---------------- tests/test_async_interface.py | 10 + tests/test_interface.py | 10 + 13 files changed, 1459 insertions(+), 1241 deletions(-) create mode 100644 src/keepa/data_models.py diff --git a/.github/workflows/testing-and-deployment.yml b/.github/workflows/testing-and-deployment.yml index 025c6fd..717463e 100644 --- a/.github/workflows/testing-and-deployment.yml +++ b/.github/workflows/testing-and-deployment.yml @@ -5,9 +5,9 @@ on: workflow_dispatch: push: tags: - - "*" + - '*' branches: - - main + - main jobs: unit_testing: @@ -22,44 +22,44 @@ jobs: WEAKKEEPAKEY: ${{ secrets.WEAKKEEPAKEY }} steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v4 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - cache: 'pip' + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + cache: pip - - name: Install - run: | - pip install .[test] --disable-pip-version-check - python -c "import keepa" + - name: Install + run: | + pip install .[test] --disable-pip-version-check + python -c "import keepa" - - name: Validate Keys - run: | - python -c "import os, keepa; keepa.Keepa(os.environ.get('KEEPAKEY'))" + - name: Validate Keys + run: | + python -c "import os, keepa; keepa.Keepa(os.environ.get('KEEPAKEY'))" - - name: Unit testing - run: | - pytest -v --cov keepa --cov-report xml + - name: Unit testing + run: | + pytest -v --cov keepa --cov-report xml - - uses: codecov/codecov-action@v4 - if: matrix.python-version == '3.12' - name: 'Upload coverage to codecov' + - uses: codecov/codecov-action@v4 + if: matrix.python-version == '3.12' + name: Upload coverage to codecov - - name: Build wheel - if: matrix.python-version == '3.12' - run: | - pip install build --disable-pip-version-check - python -m build + - name: Build wheel + if: matrix.python-version == '3.12' + run: | + pip install build --disable-pip-version-check + python -m build - - name: Upload wheel - if: matrix.python-version == '3.12' - uses: actions/upload-artifact@v4 - with: - name: keepa-wheel - path: dist/ - retention-days: 1 + - name: Upload wheel + if: matrix.python-version == '3.12' + uses: actions/upload-artifact@v4 + with: + name: keepa-wheel + path: dist/ + retention-days: 1 release: name: Upload release to PyPI @@ -72,20 +72,20 @@ jobs: permissions: id-token: write # this permission is mandatory for trusted publishing steps: - - uses: actions/download-artifact@v4 - with: - path: dist/ - - name: Flatten directory structure - run: | - mv dist/*/* dist/ - rm -rf dist/keepa-wheel - - name: Display structure of downloaded files - run: ls -R - - name: Publish package distributions to PyPI - uses: pypa/gh-action-pypi-publish@release/v1 - - name: Create GitHub Release - uses: softprops/action-gh-release@v2 - with: - generate_release_notes: true - files: | - ./**/*.whl + - uses: actions/download-artifact@v4 + with: + path: dist/ + - name: Flatten directory structure + run: | + mv dist/*/* dist/ + rm -rf dist/keepa-wheel + - name: Display structure of downloaded files + run: ls -R + - name: Publish package distributions to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + - name: Create GitHub Release + uses: softprops/action-gh-release@v2 + with: + generate_release_notes: true + files: | + ./**/*.whl diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8c94ace..f55d40d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,20 +1,20 @@ # Integration with GitHub Actions # See https://pre-commit.ci/ ci: - autofix_prs: true + autofix_prs: true repos: - repo: https://github.com/keewis/blackdoc rev: v0.3.9 hooks: - id: blackdoc - files: '\.py$' + files: \.py$ - repo: https://github.com/astral-sh/ruff-pre-commit rev: v0.5.1 hooks: - - id: ruff - args: [--fix, --exit-non-zero-on-fix] - exclude: ^(docs/|tests) - - id: ruff-format + - id: ruff + args: [--fix, --exit-non-zero-on-fix] + exclude: ^(docs/|tests) + - id: ruff-format - repo: https://github.com/codespell-project/codespell rev: v2.3.0 hooks: @@ -25,7 +25,7 @@ repos: hooks: - id: pydocstyle additional_dependencies: [toml] - exclude: "tests/" + exclude: tests/ - repo: https://github.com/asottile/pyupgrade rev: v3.16.0 hooks: @@ -39,3 +39,10 @@ repos: - id: no-commit-to-branch args: [--branch, main] - id: requirements-txt-fixer +- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks + rev: v2.13.0 + hooks: + - id: pretty-format-toml + args: [--autofix] + - id: pretty-format-yaml + args: [--autofix, --indent, '2'] diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 5986b90..532c98d 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -9,11 +9,11 @@ version: 2 build: os: ubuntu-22.04 tools: - python: "3.11" + python: '3.11' # Build documentation in the docs/ directory with Sphinx sphinx: - configuration: docs/source/conf.py + configuration: docs/source/conf.py # If using Sphinx, optionally build your docs in additional formats such as PDF # formats: @@ -21,7 +21,7 @@ sphinx: # Optionally declare the Python requirements required to build your docs python: - install: - - requirements: requirements_docs.txt - - method: pip - path: . \ No newline at end of file + install: + - requirements: requirements_docs.txt + - method: pip + path: . diff --git a/codecov.yml b/codecov.yml index 782e550..f09a49f 100644 --- a/codecov.yml +++ b/codecov.yml @@ -8,14 +8,14 @@ coverage: # basic target: 85% threshold: 80% - base: auto - flags: - - unit - paths: - - "src" + base: auto + flags: + - unit + paths: + - src # advanced - branches: - - master + branches: + - master if_not_found: success if_ci_failed: error informational: false @@ -25,18 +25,18 @@ coverage: # basic target: 90 threshold: 90 - base: auto + base: auto # advanced - branches: - - master + branches: + - master if_no_uploads: error if_not_found: success if_ci_failed: error only_pulls: false - flags: - - "unit" - paths: - - "src" + flags: + - unit + paths: + - src parsers: @@ -48,6 +48,6 @@ parsers: macro: no comment: - layout: "reach,diff,flags,tree" + layout: reach,diff,flags,tree behavior: default require_changes: no diff --git a/docs/source/api_methods.rst b/docs/source/api_methods.rst index fde87a4..d500ed2 100644 --- a/docs/source/api_methods.rst +++ b/docs/source/api_methods.rst @@ -2,6 +2,22 @@ keepa.Api Methods ----------------- +These are the core ``keepa`` classes. + .. autoclass:: keepa.Keepa :members: +Types +----- +These types and enumerators are used by ``keepa`` for data validation. + +.. autoclass:: keepa.Domain + :members: + :undoc-members: + :member-order: bysource + +.. autoclass:: keepa.ProductParams + :members: + :undoc-members: + :member-order: bysource + :exclude-members: model_computed_fields, model_config, model_fields, construct,dict,from_orm,json,parse_file,parse_obj,parse_raw,schema,schema_json,update_forward_refs,validate,copy,model_construct,model_copy,model_dump,model_dump_json,model_json_schema,model_parametrized_name,model_post_init,model_rebuild,model_validate,model_validate_json,model_validate_strings, model_extra, model_fields_set diff --git a/docs/source/conf.py b/docs/source/conf.py index d7dc2dd..59303f9 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -12,7 +12,18 @@ # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. -extensions = ["sphinx.ext.autodoc", "sphinx.ext.napoleon"] +extensions = [ + "sphinx.ext.autodoc", + "numpydoc", + "sphinx.ext.intersphinx", +] + +intersphinx_mapping = { + "python": ( + "https://docs.python.org/3.11", + (None, "../intersphinx/python-objects.inv"), + ), +} # Add any paths that contain templates here, relative to this directory. templates_path = ["_templates"] diff --git a/pyproject.toml b/pyproject.toml index 2d1ceec..c5c5344 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,66 +1,64 @@ [build-system] -requires = ["flit_core >=3,<4"] build-backend = "flit_core.buildapi" +requires = ["flit_core >=3,<4"] + +[mypy] +plugins = "pydantic.mypy" [project] -name = "keepa" -dynamic = ["version"] -description = "Interfaces with keepa.com's API." -readme = "README.rst" authors = [ - {name = "Alex Kaszynski", email = "akascap@gmail.com"} + {name = "Alex Kaszynski", email = "akascap@gmail.com"} ] classifiers = [ - "Development Status :: 5 - Production/Stable", - "Intended Audience :: End Users/Desktop", - "Topic :: Database :: Front-Ends", - "License :: OSI Approved :: Apache Software License", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", + "Development Status :: 5 - Production/Stable", + "Intended Audience :: End Users/Desktop", + "Topic :: Database :: Front-Ends", + "License :: OSI Approved :: Apache Software License", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12" ] -keywords = ["keepa"] dependencies = [ - "numpy >=1.9.3", - "requests >=2.2", - "tqdm", - "aiohttp", - "pandas <= 3.0", + "numpy >=1.9.3", + "requests >=2.2", + "tqdm", + "aiohttp", + "pandas <= 3.0", + "pydantic" ] - -[project.urls] -Documentation = "https://keepaapi.readthedocs.io/en/latest/" -Source = "https://github.com/akaszynski/keepa" +description = "Interfaces with keepa.com's API." +dynamic = ["version"] +keywords = ["keepa"] +name = "keepa" +readme = "README.rst" [project.optional-dependencies] -test = [ - "matplotlib", - "pandas", - "pytest-asyncio", - "pytest-cov", - "pytest", -] doc = [ - "sphinx==6.1.2", - "pydata-sphinx-theme==0.14.2", + "sphinx==7.3.7", + "pydata-sphinx-theme==0.15.4", + "numpydoc==1.7.0" ] +test = [ + "matplotlib", + "pandas", + "pytest-asyncio", + "pytest-cov", + "pytest" +] + +[project.urls] +Documentation = "https://keepaapi.readthedocs.io/en/latest/" +Source = "https://github.com/akaszynski/keepa" [tool.pytest.ini_options] addopts = "--cov=keepa --cov-fail-under=85" - -[tool.isort] -profile = 'black' -line_length = 100 -# Sort by name, don't cluster "from" vs "import" -force_sort_within_sections = true -# Combines "as" imports on the same line -combine_as_imports = true +testpaths = 'tests' [tool.ruff] line-length = 100 [tool.ruff.lint] +ignore = [] select = ["E", "F", "W", "I001"] # pyflakes, pycodestyle, isort -ignore = [] \ No newline at end of file diff --git a/requirements_docs.txt b/requirements_docs.txt index ac78a8a..b7f2c16 100644 --- a/requirements_docs.txt +++ b/requirements_docs.txt @@ -1,2 +1,2 @@ -pydata-sphinx-theme==0.12.0 -sphinx==6.1.2 +pydata-sphinx-theme==0.15.4 +sphinx==7.3.7 diff --git a/src/keepa/__init__.py b/src/keepa/__init__.py index 741e297..c020376 100644 --- a/src/keepa/__init__.py +++ b/src/keepa/__init__.py @@ -1,11 +1,13 @@ """Keepaapi module.""" __version__ = "1.4.dev0" -from keepa.interface import ( # noqa: F401 +from keepa.data_models import ProductParams +from keepa.interface import ( DCODES, KEEPA_ST_ORDINAL, SCODES, AsyncKeepa, + Domain, Keepa, convert_offer_history, csv_indices, @@ -15,4 +17,22 @@ process_used_buybox, run_and_get, ) -from keepa.plotting import plot_product # noqa: F401 +from keepa.plotting import plot_product + +__all__ = [ + "ProductParams", + "Domain", + "DCODES", + "KEEPA_ST_ORDINAL", + "SCODES", + "AsyncKeepa", + "Keepa", + "convert_offer_history", + "csv_indices", + "format_items", + "keepa_minutes_to_time", + "parse_csv", + "process_used_buybox", + "run_and_get", + "plot_product", +] diff --git a/src/keepa/data_models.py b/src/keepa/data_models.py new file mode 100644 index 0000000..46fad98 --- /dev/null +++ b/src/keepa/data_models.py @@ -0,0 +1,1131 @@ +"""Contains the data models for keepa requests.""" + +from typing import List, Optional, Union + +from pydantic import BaseModel + + +class ProductParams(BaseModel): + """Product request parameters. + + See: + https://github.com/keepacom/api_backend/blob/6f2048e1b8551875324445113e30041bbe37a147/src/main/java/com/keepa/api/backend/structs/ProductFinderRequest.java + + Examples + -------- + Use attributes: + + >>> import keepa + >>> product_params = keepa.ProductParams() + >>> product_params.author = "J. R. R. Tolkien" + + Use keywords: + + >>> product_params = keepa.ProductParams(author="J. R. R. Tolkien") + + Use within :func:`keepa.Keepa.product_finder`: + + >>> import keepa + >>> api = keepa.Keepa("") + >>> product_params = keepa.ProductParams(author="J. R. R. Tolkien") + >>> asins = api.product_finder(product_parms, n_products=100) + + """ + + author: Optional[Union[List[str], str]] = None + availabilityAmazon: Optional[int] = None + avg180_AMAZON_lte: Optional[int] = None + avg180_AMAZON_gte: Optional[int] = None + avg180_BUY_BOX_SHIPPING_lte: Optional[int] = None + avg180_BUY_BOX_SHIPPING_gte: Optional[int] = None + avg180_BUY_BOX_USED_SHIPPING_lte: Optional[int] = None + avg180_BUY_BOX_USED_SHIPPING_gte: Optional[int] = None + avg180_COLLECTIBLE_lte: Optional[int] = None + avg180_COLLECTIBLE_gte: Optional[int] = None + avg180_COUNT_COLLECTIBLE_lte: Optional[int] = None + avg180_COUNT_COLLECTIBLE_gte: Optional[int] = None + avg180_COUNT_NEW_lte: Optional[int] = None + avg180_COUNT_NEW_gte: Optional[int] = None + avg180_COUNT_REFURBISHED_lte: Optional[int] = None + avg180_COUNT_REFURBISHED_gte: Optional[int] = None + avg180_COUNT_REVIEWS_lte: Optional[int] = None + avg180_COUNT_REVIEWS_gte: Optional[int] = None + avg180_COUNT_USED_lte: Optional[int] = None + avg180_COUNT_USED_gte: Optional[int] = None + avg180_EBAY_NEW_SHIPPING_lte: Optional[int] = None + avg180_EBAY_NEW_SHIPPING_gte: Optional[int] = None + avg180_EBAY_USED_SHIPPING_lte: Optional[int] = None + avg180_EBAY_USED_SHIPPING_gte: Optional[int] = None + avg180_LIGHTNING_DEAL_lte: Optional[int] = None + avg180_LIGHTNING_DEAL_gte: Optional[int] = None + avg180_LISTPRICE_lte: Optional[int] = None + avg180_LISTPRICE_gte: Optional[int] = None + avg180_NEW_lte: Optional[int] = None + avg180_NEW_gte: Optional[int] = None + avg180_NEW_FBA_lte: Optional[int] = None + avg180_NEW_FBA_gte: Optional[int] = None + avg180_NEW_FBM_SHIPPING_lte: Optional[int] = None + avg180_NEW_FBM_SHIPPING_gte: Optional[int] = None + avg180_PRIME_EXCL_lte: Optional[int] = None + avg180_PRIME_EXCL_gte: Optional[int] = None + avg180_RATING_lte: Optional[int] = None + avg180_RATING_gte: Optional[int] = None + avg180_REFURBISHED_lte: Optional[int] = None + avg180_REFURBISHED_gte: Optional[int] = None + avg180_REFURBISHED_SHIPPING_lte: Optional[int] = None + avg180_REFURBISHED_SHIPPING_gte: Optional[int] = None + avg180_RENT_lte: Optional[int] = None + avg180_RENT_gte: Optional[int] = None + avg180_SALES_lte: Optional[int] = None + avg180_SALES_gte: Optional[int] = None + avg180_TRADE_IN_lte: Optional[int] = None + avg180_TRADE_IN_gte: Optional[int] = None + avg180_USED_lte: Optional[int] = None + avg180_USED_gte: Optional[int] = None + avg180_USED_ACCEPTABLE_SHIPPING_lte: Optional[int] = None + avg180_USED_ACCEPTABLE_SHIPPING_gte: Optional[int] = None + avg180_USED_GOOD_SHIPPING_lte: Optional[int] = None + avg180_USED_GOOD_SHIPPING_gte: Optional[int] = None + avg180_USED_NEW_SHIPPING_lte: Optional[int] = None + avg180_USED_NEW_SHIPPING_gte: Optional[int] = None + avg180_USED_VERY_GOOD_SHIPPING_lte: Optional[int] = None + avg180_USED_VERY_GOOD_SHIPPING_gte: Optional[int] = None + avg180_WAREHOUSE_lte: Optional[int] = None + avg180_WAREHOUSE_gte: Optional[int] = None + avg1_AMAZON_lte: Optional[int] = None + avg1_AMAZON_gte: Optional[int] = None + avg1_BUY_BOX_SHIPPING_lte: Optional[int] = None + avg1_BUY_BOX_SHIPPING_gte: Optional[int] = None + avg1_BUY_BOX_USED_SHIPPING_lte: Optional[int] = None + avg1_BUY_BOX_USED_SHIPPING_gte: Optional[int] = None + avg1_COLLECTIBLE_lte: Optional[int] = None + avg1_COLLECTIBLE_gte: Optional[int] = None + avg1_COUNT_COLLECTIBLE_lte: Optional[int] = None + avg1_COUNT_COLLECTIBLE_gte: Optional[int] = None + avg1_COUNT_NEW_lte: Optional[int] = None + avg1_COUNT_NEW_gte: Optional[int] = None + avg1_COUNT_REFURBISHED_lte: Optional[int] = None + avg1_COUNT_REFURBISHED_gte: Optional[int] = None + avg1_COUNT_REVIEWS_lte: Optional[int] = None + avg1_COUNT_REVIEWS_gte: Optional[int] = None + avg1_COUNT_USED_lte: Optional[int] = None + avg1_COUNT_USED_gte: Optional[int] = None + avg1_EBAY_NEW_SHIPPING_lte: Optional[int] = None + avg1_EBAY_NEW_SHIPPING_gte: Optional[int] = None + avg1_EBAY_USED_SHIPPING_lte: Optional[int] = None + avg1_EBAY_USED_SHIPPING_gte: Optional[int] = None + avg1_LIGHTNING_DEAL_lte: Optional[int] = None + avg1_LIGHTNING_DEAL_gte: Optional[int] = None + avg1_LISTPRICE_lte: Optional[int] = None + avg1_LISTPRICE_gte: Optional[int] = None + avg1_NEW_lte: Optional[int] = None + avg1_NEW_gte: Optional[int] = None + avg1_NEW_FBA_lte: Optional[int] = None + avg1_NEW_FBA_gte: Optional[int] = None + avg1_NEW_FBM_SHIPPING_lte: Optional[int] = None + avg1_NEW_FBM_SHIPPING_gte: Optional[int] = None + avg1_PRIME_EXCL_lte: Optional[int] = None + avg1_PRIME_EXCL_gte: Optional[int] = None + avg1_RATING_lte: Optional[int] = None + avg1_RATING_gte: Optional[int] = None + avg1_REFURBISHED_lte: Optional[int] = None + avg1_REFURBISHED_gte: Optional[int] = None + avg1_REFURBISHED_SHIPPING_lte: Optional[int] = None + avg1_REFURBISHED_SHIPPING_gte: Optional[int] = None + avg1_RENT_lte: Optional[int] = None + avg1_RENT_gte: Optional[int] = None + avg1_SALES_lte: Optional[int] = None + avg1_SALES_gte: Optional[int] = None + avg1_TRADE_IN_lte: Optional[int] = None + avg1_TRADE_IN_gte: Optional[int] = None + avg1_USED_lte: Optional[int] = None + avg1_USED_gte: Optional[int] = None + avg1_USED_ACCEPTABLE_SHIPPING_lte: Optional[int] = None + avg1_USED_ACCEPTABLE_SHIPPING_gte: Optional[int] = None + avg1_USED_GOOD_SHIPPING_lte: Optional[int] = None + avg1_USED_GOOD_SHIPPING_gte: Optional[int] = None + avg1_USED_NEW_SHIPPING_lte: Optional[int] = None + avg1_USED_NEW_SHIPPING_gte: Optional[int] = None + avg1_USED_VERY_GOOD_SHIPPING_lte: Optional[int] = None + avg1_USED_VERY_GOOD_SHIPPING_gte: Optional[int] = None + avg1_WAREHOUSE_lte: Optional[int] = None + avg1_WAREHOUSE_gte: Optional[int] = None + avg30_AMAZON_lte: Optional[int] = None + avg30_AMAZON_gte: Optional[int] = None + avg30_BUY_BOX_SHIPPING_lte: Optional[int] = None + avg30_BUY_BOX_SHIPPING_gte: Optional[int] = None + avg30_BUY_BOX_USED_SHIPPING_lte: Optional[int] = None + avg30_BUY_BOX_USED_SHIPPING_gte: Optional[int] = None + avg30_COLLECTIBLE_lte: Optional[int] = None + avg30_COLLECTIBLE_gte: Optional[int] = None + avg30_COUNT_COLLECTIBLE_lte: Optional[int] = None + avg30_COUNT_COLLECTIBLE_gte: Optional[int] = None + avg30_COUNT_NEW_lte: Optional[int] = None + avg30_COUNT_NEW_gte: Optional[int] = None + avg30_COUNT_REFURBISHED_lte: Optional[int] = None + avg30_COUNT_REFURBISHED_gte: Optional[int] = None + avg30_COUNT_REVIEWS_lte: Optional[int] = None + avg30_COUNT_REVIEWS_gte: Optional[int] = None + avg30_COUNT_USED_lte: Optional[int] = None + avg30_COUNT_USED_gte: Optional[int] = None + avg30_EBAY_NEW_SHIPPING_lte: Optional[int] = None + avg30_EBAY_NEW_SHIPPING_gte: Optional[int] = None + avg30_EBAY_USED_SHIPPING_lte: Optional[int] = None + avg30_EBAY_USED_SHIPPING_gte: Optional[int] = None + avg30_LIGHTNING_DEAL_lte: Optional[int] = None + avg30_LIGHTNING_DEAL_gte: Optional[int] = None + avg30_LISTPRICE_lte: Optional[int] = None + avg30_LISTPRICE_gte: Optional[int] = None + avg30_NEW_lte: Optional[int] = None + avg30_NEW_gte: Optional[int] = None + avg30_NEW_FBA_lte: Optional[int] = None + avg30_NEW_FBA_gte: Optional[int] = None + avg30_NEW_FBM_SHIPPING_lte: Optional[int] = None + avg30_NEW_FBM_SHIPPING_gte: Optional[int] = None + avg30_PRIME_EXCL_lte: Optional[int] = None + avg30_PRIME_EXCL_gte: Optional[int] = None + avg30_RATING_lte: Optional[int] = None + avg30_RATING_gte: Optional[int] = None + avg30_REFURBISHED_lte: Optional[int] = None + avg30_REFURBISHED_gte: Optional[int] = None + avg30_REFURBISHED_SHIPPING_lte: Optional[int] = None + avg30_REFURBISHED_SHIPPING_gte: Optional[int] = None + avg30_RENT_lte: Optional[int] = None + avg30_RENT_gte: Optional[int] = None + avg30_SALES_lte: Optional[int] = None + avg30_SALES_gte: Optional[int] = None + avg30_TRADE_IN_lte: Optional[int] = None + avg30_TRADE_IN_gte: Optional[int] = None + avg30_USED_lte: Optional[int] = None + avg30_USED_gte: Optional[int] = None + avg30_USED_ACCEPTABLE_SHIPPING_lte: Optional[int] = None + avg30_USED_ACCEPTABLE_SHIPPING_gte: Optional[int] = None + avg30_USED_GOOD_SHIPPING_lte: Optional[int] = None + avg30_USED_GOOD_SHIPPING_gte: Optional[int] = None + avg30_USED_NEW_SHIPPING_lte: Optional[int] = None + avg30_USED_NEW_SHIPPING_gte: Optional[int] = None + avg30_USED_VERY_GOOD_SHIPPING_lte: Optional[int] = None + avg30_USED_VERY_GOOD_SHIPPING_gte: Optional[int] = None + avg30_WAREHOUSE_lte: Optional[int] = None + avg30_WAREHOUSE_gte: Optional[int] = None + avg7_AMAZON_lte: Optional[int] = None + avg7_AMAZON_gte: Optional[int] = None + avg7_BUY_BOX_SHIPPING_lte: Optional[int] = None + avg7_BUY_BOX_SHIPPING_gte: Optional[int] = None + avg7_BUY_BOX_USED_SHIPPING_lte: Optional[int] = None + avg7_BUY_BOX_USED_SHIPPING_gte: Optional[int] = None + avg7_COLLECTIBLE_lte: Optional[int] = None + avg7_COLLECTIBLE_gte: Optional[int] = None + avg7_COUNT_COLLECTIBLE_lte: Optional[int] = None + avg7_COUNT_COLLECTIBLE_gte: Optional[int] = None + avg7_COUNT_NEW_lte: Optional[int] = None + avg7_COUNT_NEW_gte: Optional[int] = None + avg7_COUNT_REFURBISHED_lte: Optional[int] = None + avg7_COUNT_REFURBISHED_gte: Optional[int] = None + avg7_COUNT_REVIEWS_lte: Optional[int] = None + avg7_COUNT_REVIEWS_gte: Optional[int] = None + avg7_COUNT_USED_lte: Optional[int] = None + avg7_COUNT_USED_gte: Optional[int] = None + avg7_EBAY_NEW_SHIPPING_lte: Optional[int] = None + avg7_EBAY_NEW_SHIPPING_gte: Optional[int] = None + avg7_EBAY_USED_SHIPPING_lte: Optional[int] = None + avg7_EBAY_USED_SHIPPING_gte: Optional[int] = None + avg7_LIGHTNING_DEAL_lte: Optional[int] = None + avg7_LIGHTNING_DEAL_gte: Optional[int] = None + avg7_LISTPRICE_lte: Optional[int] = None + avg7_LISTPRICE_gte: Optional[int] = None + avg7_NEW_lte: Optional[int] = None + avg7_NEW_gte: Optional[int] = None + avg7_NEW_FBA_lte: Optional[int] = None + avg7_NEW_FBA_gte: Optional[int] = None + avg7_NEW_FBM_SHIPPING_lte: Optional[int] = None + avg7_NEW_FBM_SHIPPING_gte: Optional[int] = None + avg7_PRIME_EXCL_lte: Optional[int] = None + avg7_PRIME_EXCL_gte: Optional[int] = None + avg7_RATING_lte: Optional[int] = None + avg7_RATING_gte: Optional[int] = None + avg7_REFURBISHED_lte: Optional[int] = None + avg7_REFURBISHED_gte: Optional[int] = None + avg7_REFURBISHED_SHIPPING_lte: Optional[int] = None + avg7_REFURBISHED_SHIPPING_gte: Optional[int] = None + avg7_RENT_lte: Optional[int] = None + avg7_RENT_gte: Optional[int] = None + avg7_SALES_lte: Optional[int] = None + avg7_SALES_gte: Optional[int] = None + avg7_TRADE_IN_lte: Optional[int] = None + avg7_TRADE_IN_gte: Optional[int] = None + avg7_USED_lte: Optional[int] = None + avg7_USED_gte: Optional[int] = None + avg7_USED_ACCEPTABLE_SHIPPING_lte: Optional[int] = None + avg7_USED_ACCEPTABLE_SHIPPING_gte: Optional[int] = None + avg7_USED_GOOD_SHIPPING_lte: Optional[int] = None + avg7_USED_GOOD_SHIPPING_gte: Optional[int] = None + avg7_USED_NEW_SHIPPING_lte: Optional[int] = None + avg7_USED_NEW_SHIPPING_gte: Optional[int] = None + avg7_USED_VERY_GOOD_SHIPPING_lte: Optional[int] = None + avg7_USED_VERY_GOOD_SHIPPING_gte: Optional[int] = None + avg7_WAREHOUSE_lte: Optional[int] = None + avg7_WAREHOUSE_gte: Optional[int] = None + avg90_AMAZON_lte: Optional[int] = None + avg90_AMAZON_gte: Optional[int] = None + avg90_BUY_BOX_SHIPPING_lte: Optional[int] = None + avg90_BUY_BOX_SHIPPING_gte: Optional[int] = None + avg90_BUY_BOX_USED_SHIPPING_lte: Optional[int] = None + avg90_BUY_BOX_USED_SHIPPING_gte: Optional[int] = None + avg90_COLLECTIBLE_lte: Optional[int] = None + avg90_COLLECTIBLE_gte: Optional[int] = None + avg90_COUNT_COLLECTIBLE_lte: Optional[int] = None + avg90_COUNT_COLLECTIBLE_gte: Optional[int] = None + avg90_COUNT_NEW_lte: Optional[int] = None + avg90_COUNT_NEW_gte: Optional[int] = None + avg90_COUNT_REFURBISHED_lte: Optional[int] = None + avg90_COUNT_REFURBISHED_gte: Optional[int] = None + avg90_COUNT_REVIEWS_lte: Optional[int] = None + avg90_COUNT_REVIEWS_gte: Optional[int] = None + avg90_COUNT_USED_lte: Optional[int] = None + avg90_COUNT_USED_gte: Optional[int] = None + avg90_EBAY_NEW_SHIPPING_lte: Optional[int] = None + avg90_EBAY_NEW_SHIPPING_gte: Optional[int] = None + avg90_EBAY_USED_SHIPPING_lte: Optional[int] = None + avg90_EBAY_USED_SHIPPING_gte: Optional[int] = None + avg90_LIGHTNING_DEAL_lte: Optional[int] = None + avg90_LIGHTNING_DEAL_gte: Optional[int] = None + avg90_LISTPRICE_lte: Optional[int] = None + avg90_LISTPRICE_gte: Optional[int] = None + avg90_NEW_lte: Optional[int] = None + avg90_NEW_gte: Optional[int] = None + avg90_NEW_FBA_lte: Optional[int] = None + avg90_NEW_FBA_gte: Optional[int] = None + avg90_NEW_FBM_SHIPPING_lte: Optional[int] = None + avg90_NEW_FBM_SHIPPING_gte: Optional[int] = None + avg90_PRIME_EXCL_lte: Optional[int] = None + avg90_PRIME_EXCL_gte: Optional[int] = None + avg90_RATING_lte: Optional[int] = None + avg90_RATING_gte: Optional[int] = None + avg90_REFURBISHED_lte: Optional[int] = None + avg90_REFURBISHED_gte: Optional[int] = None + avg90_REFURBISHED_SHIPPING_lte: Optional[int] = None + avg90_REFURBISHED_SHIPPING_gte: Optional[int] = None + avg90_RENT_lte: Optional[int] = None + avg90_RENT_gte: Optional[int] = None + avg90_SALES_lte: Optional[int] = None + avg90_SALES_gte: Optional[int] = None + avg90_TRADE_IN_lte: Optional[int] = None + avg90_TRADE_IN_gte: Optional[int] = None + avg90_USED_lte: Optional[int] = None + avg90_USED_gte: Optional[int] = None + avg90_USED_ACCEPTABLE_SHIPPING_lte: Optional[int] = None + avg90_USED_ACCEPTABLE_SHIPPING_gte: Optional[int] = None + avg90_USED_GOOD_SHIPPING_lte: Optional[int] = None + avg90_USED_GOOD_SHIPPING_gte: Optional[int] = None + avg90_USED_NEW_SHIPPING_lte: Optional[int] = None + avg90_USED_NEW_SHIPPING_gte: Optional[int] = None + avg90_USED_VERY_GOOD_SHIPPING_lte: Optional[int] = None + avg90_USED_VERY_GOOD_SHIPPING_gte: Optional[int] = None + avg90_WAREHOUSE_lte: Optional[int] = None + avg90_WAREHOUSE_gte: Optional[int] = None + backInStock_AMAZON: Optional[bool] = None + backInStock_BUY_BOX_SHIPPING: Optional[bool] = None + backInStock_BUY_BOX_USED_SHIPPING: Optional[bool] = None + backInStock_COLLECTIBLE: Optional[bool] = None + backInStock_COUNT_COLLECTIBLE: Optional[bool] = None + backInStock_COUNT_NEW: Optional[bool] = None + backInStock_COUNT_REFURBISHED: Optional[bool] = None + backInStock_COUNT_REVIEWS: Optional[bool] = None + backInStock_COUNT_USED: Optional[bool] = None + backInStock_EBAY_NEW_SHIPPING: Optional[bool] = None + backInStock_EBAY_USED_SHIPPING: Optional[bool] = None + backInStock_LIGHTNING_DEAL: Optional[bool] = None + backInStock_LISTPRICE: Optional[bool] = None + backInStock_NEW: Optional[bool] = None + backInStock_NEW_FBA: Optional[bool] = None + backInStock_NEW_FBM_SHIPPING: Optional[bool] = None + backInStock_PRIME_EXCL: Optional[bool] = None + backInStock_RATING: Optional[bool] = None + backInStock_REFURBISHED: Optional[bool] = None + backInStock_REFURBISHED_SHIPPING: Optional[bool] = None + backInStock_RENT: Optional[bool] = None + backInStock_SALES: Optional[bool] = None + backInStock_TRADE_IN: Optional[bool] = None + backInStock_USED: Optional[bool] = None + backInStock_USED_ACCEPTABLE_SHIPPING: Optional[bool] = None + backInStock_USED_GOOD_SHIPPING: Optional[bool] = None + backInStock_USED_NEW_SHIPPING: Optional[bool] = None + backInStock_USED_VERY_GOOD_SHIPPING: Optional[bool] = None + backInStock_WAREHOUSE: Optional[bool] = None + binding: Optional[Union[List[str], str]] = None + brand: Optional[Union[List[str], str]] = None + buyBoxIsAmazon: Optional[bool] = None + buyBoxIsFBA: Optional[bool] = None + buyBoxIsUnqualified: Optional[bool] = None + buyBoxSellerId: Optional[Union[List[str], str]] = None + buyBoxUsedCondition_lte: Optional[int] = None + buyBoxUsedCondition_gte: Optional[int] = None + buyBoxUsedIsFBA: Optional[bool] = None + buyBoxUsedSellerId: Optional[str] = None + categories_include: Optional[Union[List[int], int]] = None + categories_exclude: Optional[Union[List[int], int]] = None + color: Optional[Union[List[str], str]] = None + couponOneTimeAbsolute_lte: Optional[int] = None + couponOneTimeAbsolute_gte: Optional[int] = None + couponOneTimePercent_lte: Optional[int] = None + couponOneTimePercent_gte: Optional[int] = None + couponSNSPercent_lte: Optional[int] = None + couponSNSPercent_gte: Optional[int] = None + current_AMAZON_lte: Optional[int] = None + current_AMAZON_gte: Optional[int] = None + current_BUY_BOX_SHIPPING_lte: Optional[int] = None + current_BUY_BOX_SHIPPING_gte: Optional[int] = None + current_BUY_BOX_USED_SHIPPING_lte: Optional[int] = None + current_BUY_BOX_USED_SHIPPING_gte: Optional[int] = None + current_COLLECTIBLE_lte: Optional[int] = None + current_COLLECTIBLE_gte: Optional[int] = None + current_COUNT_COLLECTIBLE_lte: Optional[int] = None + current_COUNT_COLLECTIBLE_gte: Optional[int] = None + current_COUNT_NEW_lte: Optional[int] = None + current_COUNT_NEW_gte: Optional[int] = None + current_COUNT_REFURBISHED_lte: Optional[int] = None + current_COUNT_REFURBISHED_gte: Optional[int] = None + current_COUNT_REVIEWS_lte: Optional[int] = None + current_COUNT_REVIEWS_gte: Optional[int] = None + current_COUNT_USED_lte: Optional[int] = None + current_COUNT_USED_gte: Optional[int] = None + current_EBAY_NEW_SHIPPING_lte: Optional[int] = None + current_EBAY_NEW_SHIPPING_gte: Optional[int] = None + current_EBAY_USED_SHIPPING_lte: Optional[int] = None + current_EBAY_USED_SHIPPING_gte: Optional[int] = None + current_LIGHTNING_DEAL_lte: Optional[int] = None + current_LIGHTNING_DEAL_gte: Optional[int] = None + current_LISTPRICE_lte: Optional[int] = None + current_LISTPRICE_gte: Optional[int] = None + current_NEW_lte: Optional[int] = None + current_NEW_gte: Optional[int] = None + current_NEW_FBA_lte: Optional[int] = None + current_NEW_FBA_gte: Optional[int] = None + current_NEW_FBM_SHIPPING_lte: Optional[int] = None + current_NEW_FBM_SHIPPING_gte: Optional[int] = None + current_PRIME_EXCL_lte: Optional[int] = None + current_PRIME_EXCL_gte: Optional[int] = None + current_RATING_lte: Optional[int] = None + current_RATING_gte: Optional[int] = None + current_REFURBISHED_lte: Optional[int] = None + current_REFURBISHED_gte: Optional[int] = None + current_REFURBISHED_SHIPPING_lte: Optional[int] = None + current_REFURBISHED_SHIPPING_gte: Optional[int] = None + current_RENT_lte: Optional[int] = None + current_RENT_gte: Optional[int] = None + current_SALES_lte: Optional[int] = None + current_SALES_gte: Optional[int] = None + current_TRADE_IN_lte: Optional[int] = None + current_TRADE_IN_gte: Optional[int] = None + current_USED_lte: Optional[int] = None + current_USED_gte: Optional[int] = None + current_USED_ACCEPTABLE_SHIPPING_lte: Optional[int] = None + current_USED_ACCEPTABLE_SHIPPING_gte: Optional[int] = None + current_USED_GOOD_SHIPPING_lte: Optional[int] = None + current_USED_GOOD_SHIPPING_gte: Optional[int] = None + current_USED_NEW_SHIPPING_lte: Optional[int] = None + current_USED_NEW_SHIPPING_gte: Optional[int] = None + current_USED_VERY_GOOD_SHIPPING_lte: Optional[int] = None + current_USED_VERY_GOOD_SHIPPING_gte: Optional[int] = None + current_WAREHOUSE_lte: Optional[int] = None + current_WAREHOUSE_gte: Optional[int] = None + delta1_AMAZON_lte: Optional[int] = None + delta1_AMAZON_gte: Optional[int] = None + delta1_BUY_BOX_SHIPPING_lte: Optional[int] = None + delta1_BUY_BOX_SHIPPING_gte: Optional[int] = None + delta1_BUY_BOX_USED_SHIPPING_lte: Optional[int] = None + delta1_BUY_BOX_USED_SHIPPING_gte: Optional[int] = None + delta1_COLLECTIBLE_lte: Optional[int] = None + delta1_COLLECTIBLE_gte: Optional[int] = None + delta1_COUNT_COLLECTIBLE_lte: Optional[int] = None + delta1_COUNT_COLLECTIBLE_gte: Optional[int] = None + delta1_COUNT_NEW_lte: Optional[int] = None + delta1_COUNT_NEW_gte: Optional[int] = None + delta1_COUNT_REFURBISHED_lte: Optional[int] = None + delta1_COUNT_REFURBISHED_gte: Optional[int] = None + delta1_COUNT_REVIEWS_lte: Optional[int] = None + delta1_COUNT_REVIEWS_gte: Optional[int] = None + delta1_COUNT_USED_lte: Optional[int] = None + delta1_COUNT_USED_gte: Optional[int] = None + delta1_EBAY_NEW_SHIPPING_lte: Optional[int] = None + delta1_EBAY_NEW_SHIPPING_gte: Optional[int] = None + delta1_EBAY_USED_SHIPPING_lte: Optional[int] = None + delta1_EBAY_USED_SHIPPING_gte: Optional[int] = None + delta1_LIGHTNING_DEAL_lte: Optional[int] = None + delta1_LIGHTNING_DEAL_gte: Optional[int] = None + delta1_LISTPRICE_lte: Optional[int] = None + delta1_LISTPRICE_gte: Optional[int] = None + delta1_NEW_lte: Optional[int] = None + delta1_NEW_gte: Optional[int] = None + delta1_NEW_FBA_lte: Optional[int] = None + delta1_NEW_FBA_gte: Optional[int] = None + delta1_NEW_FBM_SHIPPING_lte: Optional[int] = None + delta1_NEW_FBM_SHIPPING_gte: Optional[int] = None + delta1_PRIME_EXCL_lte: Optional[int] = None + delta1_PRIME_EXCL_gte: Optional[int] = None + delta1_RATING_lte: Optional[int] = None + delta1_RATING_gte: Optional[int] = None + delta1_REFURBISHED_lte: Optional[int] = None + delta1_REFURBISHED_gte: Optional[int] = None + delta1_REFURBISHED_SHIPPING_lte: Optional[int] = None + delta1_REFURBISHED_SHIPPING_gte: Optional[int] = None + delta1_RENT_lte: Optional[int] = None + delta1_RENT_gte: Optional[int] = None + delta1_SALES_lte: Optional[int] = None + delta1_SALES_gte: Optional[int] = None + delta1_TRADE_IN_lte: Optional[int] = None + delta1_TRADE_IN_gte: Optional[int] = None + delta1_USED_lte: Optional[int] = None + delta1_USED_gte: Optional[int] = None + delta1_USED_ACCEPTABLE_SHIPPING_lte: Optional[int] = None + delta1_USED_ACCEPTABLE_SHIPPING_gte: Optional[int] = None + delta1_USED_GOOD_SHIPPING_lte: Optional[int] = None + delta1_USED_GOOD_SHIPPING_gte: Optional[int] = None + delta1_USED_NEW_SHIPPING_lte: Optional[int] = None + delta1_USED_NEW_SHIPPING_gte: Optional[int] = None + delta1_USED_VERY_GOOD_SHIPPING_lte: Optional[int] = None + delta1_USED_VERY_GOOD_SHIPPING_gte: Optional[int] = None + delta1_WAREHOUSE_lte: Optional[int] = None + delta1_WAREHOUSE_gte: Optional[int] = None + delta30_AMAZON_lte: Optional[int] = None + delta30_AMAZON_gte: Optional[int] = None + delta30_BUY_BOX_SHIPPING_lte: Optional[int] = None + delta30_BUY_BOX_SHIPPING_gte: Optional[int] = None + delta30_BUY_BOX_USED_SHIPPING_lte: Optional[int] = None + delta30_BUY_BOX_USED_SHIPPING_gte: Optional[int] = None + delta30_COLLECTIBLE_lte: Optional[int] = None + delta30_COLLECTIBLE_gte: Optional[int] = None + delta30_COUNT_COLLECTIBLE_lte: Optional[int] = None + delta30_COUNT_COLLECTIBLE_gte: Optional[int] = None + delta30_COUNT_NEW_lte: Optional[int] = None + delta30_COUNT_NEW_gte: Optional[int] = None + delta30_COUNT_REFURBISHED_lte: Optional[int] = None + delta30_COUNT_REFURBISHED_gte: Optional[int] = None + delta30_COUNT_REVIEWS_lte: Optional[int] = None + delta30_COUNT_REVIEWS_gte: Optional[int] = None + delta30_COUNT_USED_lte: Optional[int] = None + delta30_COUNT_USED_gte: Optional[int] = None + delta30_EBAY_NEW_SHIPPING_lte: Optional[int] = None + delta30_EBAY_NEW_SHIPPING_gte: Optional[int] = None + delta30_EBAY_USED_SHIPPING_lte: Optional[int] = None + delta30_EBAY_USED_SHIPPING_gte: Optional[int] = None + delta30_LIGHTNING_DEAL_lte: Optional[int] = None + delta30_LIGHTNING_DEAL_gte: Optional[int] = None + delta30_LISTPRICE_lte: Optional[int] = None + delta30_LISTPRICE_gte: Optional[int] = None + delta30_NEW_lte: Optional[int] = None + delta30_NEW_gte: Optional[int] = None + delta30_NEW_FBA_lte: Optional[int] = None + delta30_NEW_FBA_gte: Optional[int] = None + delta30_NEW_FBM_SHIPPING_lte: Optional[int] = None + delta30_NEW_FBM_SHIPPING_gte: Optional[int] = None + delta30_PRIME_EXCL_lte: Optional[int] = None + delta30_PRIME_EXCL_gte: Optional[int] = None + delta30_RATING_lte: Optional[int] = None + delta30_RATING_gte: Optional[int] = None + delta30_REFURBISHED_lte: Optional[int] = None + delta30_REFURBISHED_gte: Optional[int] = None + delta30_REFURBISHED_SHIPPING_lte: Optional[int] = None + delta30_REFURBISHED_SHIPPING_gte: Optional[int] = None + delta30_RENT_lte: Optional[int] = None + delta30_RENT_gte: Optional[int] = None + delta30_SALES_lte: Optional[int] = None + delta30_SALES_gte: Optional[int] = None + delta30_TRADE_IN_lte: Optional[int] = None + delta30_TRADE_IN_gte: Optional[int] = None + delta30_USED_lte: Optional[int] = None + delta30_USED_gte: Optional[int] = None + delta30_USED_ACCEPTABLE_SHIPPING_lte: Optional[int] = None + delta30_USED_ACCEPTABLE_SHIPPING_gte: Optional[int] = None + delta30_USED_GOOD_SHIPPING_lte: Optional[int] = None + delta30_USED_GOOD_SHIPPING_gte: Optional[int] = None + delta30_USED_NEW_SHIPPING_lte: Optional[int] = None + delta30_USED_NEW_SHIPPING_gte: Optional[int] = None + delta30_USED_VERY_GOOD_SHIPPING_lte: Optional[int] = None + delta30_USED_VERY_GOOD_SHIPPING_gte: Optional[int] = None + delta30_WAREHOUSE_lte: Optional[int] = None + delta30_WAREHOUSE_gte: Optional[int] = None + delta7_AMAZON_lte: Optional[int] = None + delta7_AMAZON_gte: Optional[int] = None + delta7_BUY_BOX_SHIPPING_lte: Optional[int] = None + delta7_BUY_BOX_SHIPPING_gte: Optional[int] = None + delta7_BUY_BOX_USED_SHIPPING_lte: Optional[int] = None + delta7_BUY_BOX_USED_SHIPPING_gte: Optional[int] = None + delta7_COLLECTIBLE_lte: Optional[int] = None + delta7_COLLECTIBLE_gte: Optional[int] = None + delta7_COUNT_COLLECTIBLE_lte: Optional[int] = None + delta7_COUNT_COLLECTIBLE_gte: Optional[int] = None + delta7_COUNT_NEW_lte: Optional[int] = None + delta7_COUNT_NEW_gte: Optional[int] = None + delta7_COUNT_REFURBISHED_lte: Optional[int] = None + delta7_COUNT_REFURBISHED_gte: Optional[int] = None + delta7_COUNT_REVIEWS_lte: Optional[int] = None + delta7_COUNT_REVIEWS_gte: Optional[int] = None + delta7_COUNT_USED_lte: Optional[int] = None + delta7_COUNT_USED_gte: Optional[int] = None + delta7_EBAY_NEW_SHIPPING_lte: Optional[int] = None + delta7_EBAY_NEW_SHIPPING_gte: Optional[int] = None + delta7_EBAY_USED_SHIPPING_lte: Optional[int] = None + delta7_EBAY_USED_SHIPPING_gte: Optional[int] = None + delta7_LIGHTNING_DEAL_lte: Optional[int] = None + delta7_LIGHTNING_DEAL_gte: Optional[int] = None + delta7_LISTPRICE_lte: Optional[int] = None + delta7_LISTPRICE_gte: Optional[int] = None + delta7_NEW_lte: Optional[int] = None + delta7_NEW_gte: Optional[int] = None + delta7_NEW_FBA_lte: Optional[int] = None + delta7_NEW_FBA_gte: Optional[int] = None + delta7_NEW_FBM_SHIPPING_lte: Optional[int] = None + delta7_NEW_FBM_SHIPPING_gte: Optional[int] = None + delta7_PRIME_EXCL_lte: Optional[int] = None + delta7_PRIME_EXCL_gte: Optional[int] = None + delta7_RATING_lte: Optional[int] = None + delta7_RATING_gte: Optional[int] = None + delta7_REFURBISHED_lte: Optional[int] = None + delta7_REFURBISHED_gte: Optional[int] = None + delta7_REFURBISHED_SHIPPING_lte: Optional[int] = None + delta7_REFURBISHED_SHIPPING_gte: Optional[int] = None + delta7_RENT_lte: Optional[int] = None + delta7_RENT_gte: Optional[int] = None + delta7_SALES_lte: Optional[int] = None + delta7_SALES_gte: Optional[int] = None + delta7_TRADE_IN_lte: Optional[int] = None + delta7_TRADE_IN_gte: Optional[int] = None + delta7_USED_lte: Optional[int] = None + delta7_USED_gte: Optional[int] = None + delta7_USED_ACCEPTABLE_SHIPPING_lte: Optional[int] = None + delta7_USED_ACCEPTABLE_SHIPPING_gte: Optional[int] = None + delta7_USED_GOOD_SHIPPING_lte: Optional[int] = None + delta7_USED_GOOD_SHIPPING_gte: Optional[int] = None + delta7_USED_NEW_SHIPPING_lte: Optional[int] = None + delta7_USED_NEW_SHIPPING_gte: Optional[int] = None + delta7_USED_VERY_GOOD_SHIPPING_lte: Optional[int] = None + delta7_USED_VERY_GOOD_SHIPPING_gte: Optional[int] = None + delta7_WAREHOUSE_lte: Optional[int] = None + delta7_WAREHOUSE_gte: Optional[int] = None + delta90_AMAZON_lte: Optional[int] = None + delta90_AMAZON_gte: Optional[int] = None + delta90_BUY_BOX_SHIPPING_lte: Optional[int] = None + delta90_BUY_BOX_SHIPPING_gte: Optional[int] = None + delta90_BUY_BOX_USED_SHIPPING_lte: Optional[int] = None + delta90_BUY_BOX_USED_SHIPPING_gte: Optional[int] = None + delta90_COLLECTIBLE_lte: Optional[int] = None + delta90_COLLECTIBLE_gte: Optional[int] = None + delta90_COUNT_COLLECTIBLE_lte: Optional[int] = None + delta90_COUNT_COLLECTIBLE_gte: Optional[int] = None + delta90_COUNT_NEW_lte: Optional[int] = None + delta90_COUNT_NEW_gte: Optional[int] = None + delta90_COUNT_REFURBISHED_lte: Optional[int] = None + delta90_COUNT_REFURBISHED_gte: Optional[int] = None + delta90_COUNT_REVIEWS_lte: Optional[int] = None + delta90_COUNT_REVIEWS_gte: Optional[int] = None + delta90_COUNT_USED_lte: Optional[int] = None + delta90_COUNT_USED_gte: Optional[int] = None + delta90_EBAY_NEW_SHIPPING_lte: Optional[int] = None + delta90_EBAY_NEW_SHIPPING_gte: Optional[int] = None + delta90_EBAY_USED_SHIPPING_lte: Optional[int] = None + delta90_EBAY_USED_SHIPPING_gte: Optional[int] = None + delta90_LIGHTNING_DEAL_lte: Optional[int] = None + delta90_LIGHTNING_DEAL_gte: Optional[int] = None + delta90_LISTPRICE_lte: Optional[int] = None + delta90_LISTPRICE_gte: Optional[int] = None + delta90_NEW_lte: Optional[int] = None + delta90_NEW_gte: Optional[int] = None + delta90_NEW_FBA_lte: Optional[int] = None + delta90_NEW_FBA_gte: Optional[int] = None + delta90_NEW_FBM_SHIPPING_lte: Optional[int] = None + delta90_NEW_FBM_SHIPPING_gte: Optional[int] = None + delta90_PRIME_EXCL_lte: Optional[int] = None + delta90_PRIME_EXCL_gte: Optional[int] = None + delta90_RATING_lte: Optional[int] = None + delta90_RATING_gte: Optional[int] = None + delta90_REFURBISHED_lte: Optional[int] = None + delta90_REFURBISHED_gte: Optional[int] = None + delta90_REFURBISHED_SHIPPING_lte: Optional[int] = None + delta90_REFURBISHED_SHIPPING_gte: Optional[int] = None + delta90_RENT_lte: Optional[int] = None + delta90_RENT_gte: Optional[int] = None + delta90_SALES_lte: Optional[int] = None + delta90_SALES_gte: Optional[int] = None + delta90_TRADE_IN_lte: Optional[int] = None + delta90_TRADE_IN_gte: Optional[int] = None + delta90_USED_lte: Optional[int] = None + delta90_USED_gte: Optional[int] = None + delta90_USED_ACCEPTABLE_SHIPPING_lte: Optional[int] = None + delta90_USED_ACCEPTABLE_SHIPPING_gte: Optional[int] = None + delta90_USED_GOOD_SHIPPING_lte: Optional[int] = None + delta90_USED_GOOD_SHIPPING_gte: Optional[int] = None + delta90_USED_NEW_SHIPPING_lte: Optional[int] = None + delta90_USED_NEW_SHIPPING_gte: Optional[int] = None + delta90_USED_VERY_GOOD_SHIPPING_lte: Optional[int] = None + delta90_USED_VERY_GOOD_SHIPPING_gte: Optional[int] = None + delta90_WAREHOUSE_lte: Optional[int] = None + delta90_WAREHOUSE_gte: Optional[int] = None + deltaLast_AMAZON_lte: Optional[int] = None + deltaLast_AMAZON_gte: Optional[int] = None + deltaLast_BUY_BOX_SHIPPING_lte: Optional[int] = None + deltaLast_BUY_BOX_SHIPPING_gte: Optional[int] = None + deltaLast_BUY_BOX_USED_SHIPPING_lte: Optional[int] = None + deltaLast_BUY_BOX_USED_SHIPPING_gte: Optional[int] = None + deltaLast_COLLECTIBLE_lte: Optional[int] = None + deltaLast_COLLECTIBLE_gte: Optional[int] = None + deltaLast_COUNT_COLLECTIBLE_lte: Optional[int] = None + deltaLast_COUNT_COLLECTIBLE_gte: Optional[int] = None + deltaLast_COUNT_NEW_lte: Optional[int] = None + deltaLast_COUNT_NEW_gte: Optional[int] = None + deltaLast_COUNT_REFURBISHED_lte: Optional[int] = None + deltaLast_COUNT_REFURBISHED_gte: Optional[int] = None + deltaLast_COUNT_REVIEWS_lte: Optional[int] = None + deltaLast_COUNT_REVIEWS_gte: Optional[int] = None + deltaLast_COUNT_USED_lte: Optional[int] = None + deltaLast_COUNT_USED_gte: Optional[int] = None + deltaLast_EBAY_NEW_SHIPPING_lte: Optional[int] = None + deltaLast_EBAY_NEW_SHIPPING_gte: Optional[int] = None + deltaLast_EBAY_USED_SHIPPING_lte: Optional[int] = None + deltaLast_EBAY_USED_SHIPPING_gte: Optional[int] = None + deltaLast_LIGHTNING_DEAL_lte: Optional[int] = None + deltaLast_LIGHTNING_DEAL_gte: Optional[int] = None + deltaLast_LISTPRICE_lte: Optional[int] = None + deltaLast_LISTPRICE_gte: Optional[int] = None + deltaLast_NEW_lte: Optional[int] = None + deltaLast_NEW_gte: Optional[int] = None + deltaLast_NEW_FBA_lte: Optional[int] = None + deltaLast_NEW_FBA_gte: Optional[int] = None + deltaLast_NEW_FBM_SHIPPING_lte: Optional[int] = None + deltaLast_NEW_FBM_SHIPPING_gte: Optional[int] = None + deltaLast_PRIME_EXCL_lte: Optional[int] = None + deltaLast_PRIME_EXCL_gte: Optional[int] = None + deltaLast_RATING_lte: Optional[int] = None + deltaLast_RATING_gte: Optional[int] = None + deltaLast_REFURBISHED_lte: Optional[int] = None + deltaLast_REFURBISHED_gte: Optional[int] = None + deltaLast_REFURBISHED_SHIPPING_lte: Optional[int] = None + deltaLast_REFURBISHED_SHIPPING_gte: Optional[int] = None + deltaLast_RENT_lte: Optional[int] = None + deltaLast_RENT_gte: Optional[int] = None + deltaLast_SALES_lte: Optional[int] = None + deltaLast_SALES_gte: Optional[int] = None + deltaLast_TRADE_IN_lte: Optional[int] = None + deltaLast_TRADE_IN_gte: Optional[int] = None + deltaLast_USED_lte: Optional[int] = None + deltaLast_USED_gte: Optional[int] = None + deltaLast_USED_ACCEPTABLE_SHIPPING_lte: Optional[int] = None + deltaLast_USED_ACCEPTABLE_SHIPPING_gte: Optional[int] = None + deltaLast_USED_GOOD_SHIPPING_lte: Optional[int] = None + deltaLast_USED_GOOD_SHIPPING_gte: Optional[int] = None + deltaLast_USED_NEW_SHIPPING_lte: Optional[int] = None + deltaLast_USED_NEW_SHIPPING_gte: Optional[int] = None + deltaLast_USED_VERY_GOOD_SHIPPING_lte: Optional[int] = None + deltaLast_USED_VERY_GOOD_SHIPPING_gte: Optional[int] = None + deltaLast_WAREHOUSE_lte: Optional[int] = None + deltaLast_WAREHOUSE_gte: Optional[int] = None + deltaPercent1_AMAZON_lte: Optional[int] = None + deltaPercent1_AMAZON_gte: Optional[int] = None + deltaPercent1_BUY_BOX_SHIPPING_lte: Optional[int] = None + deltaPercent1_BUY_BOX_SHIPPING_gte: Optional[int] = None + deltaPercent1_BUY_BOX_USED_SHIPPING_lte: Optional[int] = None + deltaPercent1_BUY_BOX_USED_SHIPPING_gte: Optional[int] = None + deltaPercent1_COLLECTIBLE_lte: Optional[int] = None + deltaPercent1_COLLECTIBLE_gte: Optional[int] = None + deltaPercent1_COUNT_COLLECTIBLE_lte: Optional[int] = None + deltaPercent1_COUNT_COLLECTIBLE_gte: Optional[int] = None + deltaPercent1_COUNT_NEW_lte: Optional[int] = None + deltaPercent1_COUNT_NEW_gte: Optional[int] = None + deltaPercent1_COUNT_REFURBISHED_lte: Optional[int] = None + deltaPercent1_COUNT_REFURBISHED_gte: Optional[int] = None + deltaPercent1_COUNT_REVIEWS_lte: Optional[int] = None + deltaPercent1_COUNT_REVIEWS_gte: Optional[int] = None + deltaPercent1_COUNT_USED_lte: Optional[int] = None + deltaPercent1_COUNT_USED_gte: Optional[int] = None + deltaPercent1_EBAY_NEW_SHIPPING_lte: Optional[int] = None + deltaPercent1_EBAY_NEW_SHIPPING_gte: Optional[int] = None + deltaPercent1_EBAY_USED_SHIPPING_lte: Optional[int] = None + deltaPercent1_EBAY_USED_SHIPPING_gte: Optional[int] = None + deltaPercent1_LIGHTNING_DEAL_lte: Optional[int] = None + deltaPercent1_LIGHTNING_DEAL_gte: Optional[int] = None + deltaPercent1_LISTPRICE_lte: Optional[int] = None + deltaPercent1_LISTPRICE_gte: Optional[int] = None + deltaPercent1_NEW_lte: Optional[int] = None + deltaPercent1_NEW_gte: Optional[int] = None + deltaPercent1_NEW_FBA_lte: Optional[int] = None + deltaPercent1_NEW_FBA_gte: Optional[int] = None + deltaPercent1_NEW_FBM_SHIPPING_lte: Optional[int] = None + deltaPercent1_NEW_FBM_SHIPPING_gte: Optional[int] = None + deltaPercent1_PRIME_EXCL_lte: Optional[int] = None + deltaPercent1_PRIME_EXCL_gte: Optional[int] = None + deltaPercent1_RATING_lte: Optional[int] = None + deltaPercent1_RATING_gte: Optional[int] = None + deltaPercent1_REFURBISHED_lte: Optional[int] = None + deltaPercent1_REFURBISHED_gte: Optional[int] = None + deltaPercent1_REFURBISHED_SHIPPING_lte: Optional[int] = None + deltaPercent1_REFURBISHED_SHIPPING_gte: Optional[int] = None + deltaPercent1_RENT_lte: Optional[int] = None + deltaPercent1_RENT_gte: Optional[int] = None + deltaPercent1_SALES_lte: Optional[int] = None + deltaPercent1_SALES_gte: Optional[int] = None + deltaPercent1_TRADE_IN_lte: Optional[int] = None + deltaPercent1_TRADE_IN_gte: Optional[int] = None + deltaPercent1_USED_lte: Optional[int] = None + deltaPercent1_USED_gte: Optional[int] = None + deltaPercent1_USED_ACCEPTABLE_SHIPPING_lte: Optional[int] = None + deltaPercent1_USED_ACCEPTABLE_SHIPPING_gte: Optional[int] = None + deltaPercent1_USED_GOOD_SHIPPING_lte: Optional[int] = None + deltaPercent1_USED_GOOD_SHIPPING_gte: Optional[int] = None + deltaPercent1_USED_NEW_SHIPPING_lte: Optional[int] = None + deltaPercent1_USED_NEW_SHIPPING_gte: Optional[int] = None + deltaPercent1_USED_VERY_GOOD_SHIPPING_lte: Optional[int] = None + deltaPercent1_USED_VERY_GOOD_SHIPPING_gte: Optional[int] = None + deltaPercent1_WAREHOUSE_lte: Optional[int] = None + deltaPercent1_WAREHOUSE_gte: Optional[int] = None + deltaPercent30_AMAZON_lte: Optional[int] = None + deltaPercent30_AMAZON_gte: Optional[int] = None + deltaPercent30_BUY_BOX_SHIPPING_lte: Optional[int] = None + deltaPercent30_BUY_BOX_SHIPPING_gte: Optional[int] = None + deltaPercent30_BUY_BOX_USED_SHIPPING_lte: Optional[int] = None + deltaPercent30_BUY_BOX_USED_SHIPPING_gte: Optional[int] = None + deltaPercent30_COLLECTIBLE_lte: Optional[int] = None + deltaPercent30_COLLECTIBLE_gte: Optional[int] = None + deltaPercent30_COUNT_COLLECTIBLE_lte: Optional[int] = None + deltaPercent30_COUNT_COLLECTIBLE_gte: Optional[int] = None + deltaPercent30_COUNT_NEW_lte: Optional[int] = None + deltaPercent30_COUNT_NEW_gte: Optional[int] = None + deltaPercent30_COUNT_REFURBISHED_lte: Optional[int] = None + deltaPercent30_COUNT_REFURBISHED_gte: Optional[int] = None + deltaPercent30_COUNT_REVIEWS_lte: Optional[int] = None + deltaPercent30_COUNT_REVIEWS_gte: Optional[int] = None + deltaPercent30_COUNT_USED_lte: Optional[int] = None + deltaPercent30_COUNT_USED_gte: Optional[int] = None + deltaPercent30_EBAY_NEW_SHIPPING_lte: Optional[int] = None + deltaPercent30_EBAY_NEW_SHIPPING_gte: Optional[int] = None + deltaPercent30_EBAY_USED_SHIPPING_lte: Optional[int] = None + deltaPercent30_EBAY_USED_SHIPPING_gte: Optional[int] = None + deltaPercent30_LIGHTNING_DEAL_lte: Optional[int] = None + deltaPercent30_LIGHTNING_DEAL_gte: Optional[int] = None + deltaPercent30_LISTPRICE_lte: Optional[int] = None + deltaPercent30_LISTPRICE_gte: Optional[int] = None + deltaPercent30_NEW_lte: Optional[int] = None + deltaPercent30_NEW_gte: Optional[int] = None + deltaPercent30_NEW_FBA_lte: Optional[int] = None + deltaPercent30_NEW_FBA_gte: Optional[int] = None + deltaPercent30_NEW_FBM_SHIPPING_lte: Optional[int] = None + deltaPercent30_NEW_FBM_SHIPPING_gte: Optional[int] = None + deltaPercent30_PRIME_EXCL_lte: Optional[int] = None + deltaPercent30_PRIME_EXCL_gte: Optional[int] = None + deltaPercent30_RATING_lte: Optional[int] = None + deltaPercent30_RATING_gte: Optional[int] = None + deltaPercent30_REFURBISHED_lte: Optional[int] = None + deltaPercent30_REFURBISHED_gte: Optional[int] = None + deltaPercent30_REFURBISHED_SHIPPING_lte: Optional[int] = None + deltaPercent30_REFURBISHED_SHIPPING_gte: Optional[int] = None + deltaPercent30_RENT_lte: Optional[int] = None + deltaPercent30_RENT_gte: Optional[int] = None + deltaPercent30_SALES_lte: Optional[int] = None + deltaPercent30_SALES_gte: Optional[int] = None + deltaPercent30_TRADE_IN_lte: Optional[int] = None + deltaPercent30_TRADE_IN_gte: Optional[int] = None + deltaPercent30_USED_lte: Optional[int] = None + deltaPercent30_USED_gte: Optional[int] = None + deltaPercent30_USED_ACCEPTABLE_SHIPPING_lte: Optional[int] = None + deltaPercent30_USED_ACCEPTABLE_SHIPPING_gte: Optional[int] = None + deltaPercent30_USED_GOOD_SHIPPING_lte: Optional[int] = None + deltaPercent30_USED_GOOD_SHIPPING_gte: Optional[int] = None + deltaPercent30_USED_NEW_SHIPPING_lte: Optional[int] = None + deltaPercent30_USED_NEW_SHIPPING_gte: Optional[int] = None + deltaPercent30_USED_VERY_GOOD_SHIPPING_lte: Optional[int] = None + deltaPercent30_USED_VERY_GOOD_SHIPPING_gte: Optional[int] = None + deltaPercent30_WAREHOUSE_lte: Optional[int] = None + deltaPercent30_WAREHOUSE_gte: Optional[int] = None + deltaPercent7_AMAZON_lte: Optional[int] = None + deltaPercent7_AMAZON_gte: Optional[int] = None + deltaPercent7_BUY_BOX_SHIPPING_lte: Optional[int] = None + deltaPercent7_BUY_BOX_SHIPPING_gte: Optional[int] = None + deltaPercent7_BUY_BOX_USED_SHIPPING_lte: Optional[int] = None + deltaPercent7_BUY_BOX_USED_SHIPPING_gte: Optional[int] = None + deltaPercent7_COLLECTIBLE_lte: Optional[int] = None + deltaPercent7_COLLECTIBLE_gte: Optional[int] = None + deltaPercent7_COUNT_COLLECTIBLE_lte: Optional[int] = None + deltaPercent7_COUNT_COLLECTIBLE_gte: Optional[int] = None + deltaPercent7_COUNT_NEW_lte: Optional[int] = None + deltaPercent7_COUNT_NEW_gte: Optional[int] = None + deltaPercent7_COUNT_REFURBISHED_lte: Optional[int] = None + deltaPercent7_COUNT_REFURBISHED_gte: Optional[int] = None + deltaPercent7_COUNT_REVIEWS_lte: Optional[int] = None + deltaPercent7_COUNT_REVIEWS_gte: Optional[int] = None + deltaPercent7_COUNT_USED_lte: Optional[int] = None + deltaPercent7_COUNT_USED_gte: Optional[int] = None + deltaPercent7_EBAY_NEW_SHIPPING_lte: Optional[int] = None + deltaPercent7_EBAY_NEW_SHIPPING_gte: Optional[int] = None + deltaPercent7_EBAY_USED_SHIPPING_lte: Optional[int] = None + deltaPercent7_EBAY_USED_SHIPPING_gte: Optional[int] = None + deltaPercent7_LIGHTNING_DEAL_lte: Optional[int] = None + deltaPercent7_LIGHTNING_DEAL_gte: Optional[int] = None + deltaPercent7_LISTPRICE_lte: Optional[int] = None + deltaPercent7_LISTPRICE_gte: Optional[int] = None + deltaPercent7_NEW_lte: Optional[int] = None + deltaPercent7_NEW_gte: Optional[int] = None + deltaPercent7_NEW_FBA_lte: Optional[int] = None + deltaPercent7_NEW_FBA_gte: Optional[int] = None + deltaPercent7_NEW_FBM_SHIPPING_lte: Optional[int] = None + deltaPercent7_NEW_FBM_SHIPPING_gte: Optional[int] = None + deltaPercent7_PRIME_EXCL_lte: Optional[int] = None + deltaPercent7_PRIME_EXCL_gte: Optional[int] = None + deltaPercent7_RATING_lte: Optional[int] = None + deltaPercent7_RATING_gte: Optional[int] = None + deltaPercent7_REFURBISHED_lte: Optional[int] = None + deltaPercent7_REFURBISHED_gte: Optional[int] = None + deltaPercent7_REFURBISHED_SHIPPING_lte: Optional[int] = None + deltaPercent7_REFURBISHED_SHIPPING_gte: Optional[int] = None + deltaPercent7_RENT_lte: Optional[int] = None + deltaPercent7_RENT_gte: Optional[int] = None + deltaPercent7_SALES_lte: Optional[int] = None + deltaPercent7_SALES_gte: Optional[int] = None + deltaPercent7_TRADE_IN_lte: Optional[int] = None + deltaPercent7_TRADE_IN_gte: Optional[int] = None + deltaPercent7_USED_lte: Optional[int] = None + deltaPercent7_USED_gte: Optional[int] = None + deltaPercent7_USED_ACCEPTABLE_SHIPPING_lte: Optional[int] = None + deltaPercent7_USED_ACCEPTABLE_SHIPPING_gte: Optional[int] = None + deltaPercent7_USED_GOOD_SHIPPING_lte: Optional[int] = None + deltaPercent7_USED_GOOD_SHIPPING_gte: Optional[int] = None + deltaPercent7_USED_NEW_SHIPPING_lte: Optional[int] = None + deltaPercent7_USED_NEW_SHIPPING_gte: Optional[int] = None + deltaPercent7_USED_VERY_GOOD_SHIPPING_lte: Optional[int] = None + deltaPercent7_USED_VERY_GOOD_SHIPPING_gte: Optional[int] = None + deltaPercent7_WAREHOUSE_lte: Optional[int] = None + deltaPercent7_WAREHOUSE_gte: Optional[int] = None + deltaPercent90_AMAZON_lte: Optional[int] = None + deltaPercent90_AMAZON_gte: Optional[int] = None + deltaPercent90_BUY_BOX_SHIPPING_lte: Optional[int] = None + deltaPercent90_BUY_BOX_SHIPPING_gte: Optional[int] = None + deltaPercent90_BUY_BOX_USED_SHIPPING_lte: Optional[int] = None + deltaPercent90_BUY_BOX_USED_SHIPPING_gte: Optional[int] = None + deltaPercent90_COLLECTIBLE_lte: Optional[int] = None + deltaPercent90_COLLECTIBLE_gte: Optional[int] = None + deltaPercent90_COUNT_COLLECTIBLE_lte: Optional[int] = None + deltaPercent90_COUNT_COLLECTIBLE_gte: Optional[int] = None + deltaPercent90_COUNT_NEW_lte: Optional[int] = None + deltaPercent90_COUNT_NEW_gte: Optional[int] = None + deltaPercent90_COUNT_REFURBISHED_lte: Optional[int] = None + deltaPercent90_COUNT_REFURBISHED_gte: Optional[int] = None + deltaPercent90_COUNT_REVIEWS_lte: Optional[int] = None + deltaPercent90_COUNT_REVIEWS_gte: Optional[int] = None + deltaPercent90_COUNT_USED_lte: Optional[int] = None + deltaPercent90_COUNT_USED_gte: Optional[int] = None + deltaPercent90_EBAY_NEW_SHIPPING_lte: Optional[int] = None + deltaPercent90_EBAY_NEW_SHIPPING_gte: Optional[int] = None + deltaPercent90_EBAY_USED_SHIPPING_lte: Optional[int] = None + deltaPercent90_EBAY_USED_SHIPPING_gte: Optional[int] = None + deltaPercent90_LIGHTNING_DEAL_lte: Optional[int] = None + deltaPercent90_LIGHTNING_DEAL_gte: Optional[int] = None + deltaPercent90_LISTPRICE_lte: Optional[int] = None + deltaPercent90_LISTPRICE_gte: Optional[int] = None + deltaPercent90_NEW_lte: Optional[int] = None + deltaPercent90_NEW_gte: Optional[int] = None + deltaPercent90_NEW_FBA_lte: Optional[int] = None + deltaPercent90_NEW_FBA_gte: Optional[int] = None + deltaPercent90_NEW_FBM_SHIPPING_lte: Optional[int] = None + deltaPercent90_NEW_FBM_SHIPPING_gte: Optional[int] = None + deltaPercent90_PRIME_EXCL_lte: Optional[int] = None + deltaPercent90_PRIME_EXCL_gte: Optional[int] = None + deltaPercent90_RATING_lte: Optional[int] = None + deltaPercent90_RATING_gte: Optional[int] = None + deltaPercent90_REFURBISHED_lte: Optional[int] = None + deltaPercent90_REFURBISHED_gte: Optional[int] = None + deltaPercent90_REFURBISHED_SHIPPING_lte: Optional[int] = None + deltaPercent90_REFURBISHED_SHIPPING_gte: Optional[int] = None + deltaPercent90_RENT_lte: Optional[int] = None + deltaPercent90_RENT_gte: Optional[int] = None + deltaPercent90_SALES_lte: Optional[int] = None + deltaPercent90_SALES_gte: Optional[int] = None + deltaPercent90_TRADE_IN_lte: Optional[int] = None + deltaPercent90_TRADE_IN_gte: Optional[int] = None + deltaPercent90_USED_lte: Optional[int] = None + deltaPercent90_USED_gte: Optional[int] = None + deltaPercent90_USED_ACCEPTABLE_SHIPPING_lte: Optional[int] = None + deltaPercent90_USED_ACCEPTABLE_SHIPPING_gte: Optional[int] = None + deltaPercent90_USED_GOOD_SHIPPING_lte: Optional[int] = None + deltaPercent90_USED_GOOD_SHIPPING_gte: Optional[int] = None + deltaPercent90_USED_NEW_SHIPPING_lte: Optional[int] = None + deltaPercent90_USED_NEW_SHIPPING_gte: Optional[int] = None + deltaPercent90_USED_VERY_GOOD_SHIPPING_lte: Optional[int] = None + deltaPercent90_USED_VERY_GOOD_SHIPPING_gte: Optional[int] = None + deltaPercent90_WAREHOUSE_lte: Optional[int] = None + deltaPercent90_WAREHOUSE_gte: Optional[int] = None + edition: Optional[Union[List[str], str]] = None + fbaFees_lte: Optional[int] = None + fbaFees_gte: Optional[int] = None + format: Optional[Union[List[str], str]] = None + genre: Optional[Union[List[str], str]] = None + hasParentASIN: Optional[bool] = None + hasReviews: Optional[bool] = None + isAdultProduct: Optional[bool] = None + isEligibleForSuperSaverShipping: Optional[bool] = None + isEligibleForTradeIn: Optional[bool] = None + isHighestOffer: Optional[bool] = None + isLowestOffer: Optional[bool] = None + isLowest_AMAZON: Optional[bool] = None + isLowest_BUY_BOX_SHIPPING: Optional[bool] = None + isLowest_BUY_BOX_USED_SHIPPING: Optional[bool] = None + isLowest_COLLECTIBLE: Optional[bool] = None + isLowest_COUNT_COLLECTIBLE: Optional[bool] = None + isLowest_COUNT_NEW: Optional[bool] = None + isLowest_COUNT_REFURBISHED: Optional[bool] = None + isLowest_COUNT_REVIEWS: Optional[bool] = None + isLowest_COUNT_USED: Optional[bool] = None + isLowest_EBAY_NEW_SHIPPING: Optional[bool] = None + isLowest_EBAY_USED_SHIPPING: Optional[bool] = None + isLowest_LIGHTNING_DEAL: Optional[bool] = None + isLowest_LISTPRICE: Optional[bool] = None + isLowest_NEW: Optional[bool] = None + isLowest_NEW_FBA: Optional[bool] = None + isLowest_NEW_FBM_SHIPPING: Optional[bool] = None + isLowest_PRIME_EXCL: Optional[bool] = None + isLowest_RATING: Optional[bool] = None + isLowest_REFURBISHED: Optional[bool] = None + isLowest_REFURBISHED_SHIPPING: Optional[bool] = None + isLowest_RENT: Optional[bool] = None + isLowest_SALES: Optional[bool] = None + isLowest_TRADE_IN: Optional[bool] = None + isLowest_USED: Optional[bool] = None + isLowest_USED_ACCEPTABLE_SHIPPING: Optional[bool] = None + isLowest_USED_GOOD_SHIPPING: Optional[bool] = None + isLowest_USED_NEW_SHIPPING: Optional[bool] = None + isLowest_USED_VERY_GOOD_SHIPPING: Optional[bool] = None + isLowest_WAREHOUSE: Optional[bool] = None + isPrimeExclusive: Optional[bool] = None + isSNS: Optional[bool] = None + itemDimension_lte: Optional[int] = None + itemDimension_gte: Optional[int] = None + itemHeight_lte: Optional[int] = None + itemHeight_gte: Optional[int] = None + itemLength_lte: Optional[int] = None + itemLength_gte: Optional[int] = None + itemWeight_lte: Optional[int] = None + itemWeight_gte: Optional[int] = None + itemWidth_lte: Optional[int] = None + itemWidth_gte: Optional[int] = None + label: Optional[Union[List[str], str]] = None + languages: Optional[Union[List[str], str]] = None + lastOffersUpdate_lte: Optional[int] = None + lastOffersUpdate_gte: Optional[int] = None + lastPriceChange_lte: Optional[int] = None + lastPriceChange_gte: Optional[int] = None + lastRatingUpdate_lte: Optional[int] = None + lastRatingUpdate_gte: Optional[int] = None + lastUpdate_lte: Optional[int] = None + lastUpdate_gte: Optional[int] = None + lightningEnd_lte: Optional[int] = None + lightningEnd_gte: Optional[int] = None + lightningStart_lte: Optional[int] = None + lightningStart_gte: Optional[int] = None + listedSince_lte: Optional[int] = None + listedSince_gte: Optional[int] = None + manufacturer: Optional[Union[List[str], str]] = None + model: Optional[Union[List[str], str]] = None + newPriceIsMAP: Optional[bool] = None + nextUpdate_lte: Optional[int] = None + nextUpdate_gte: Optional[int] = None + numberOfItems_lte: Optional[int] = None + numberOfItems_gte: Optional[int] = None + numberOfPages_lte: Optional[int] = None + numberOfPages_gte: Optional[int] = None + numberOfTrackings_lte: Optional[int] = None + numberOfTrackings_gte: Optional[int] = None + offerCountFBA_lte: Optional[int] = None + offerCountFBA_gte: Optional[int] = None + offerCountFBM_lte: Optional[int] = None + offerCountFBM_gte: Optional[int] = None + outOfStockPercentage90_BB_lte: Optional[int] = None + outOfStockPercentage90_BB_gte: Optional[int] = None + outOfStockPercentage90_BB_USED_lte: Optional[int] = None + outOfStockPercentage90_BB_USED_gte: Optional[int] = None + outOfStockPercentage90_NEW_lte: Optional[int] = None + outOfStockPercentage90_NEW_gte: Optional[int] = None + outOfStockPercentage90_USED_lte: Optional[int] = None + outOfStockPercentage90_USED_gte: Optional[int] = None + outOfStockPercentageInInterval_lte: Optional[int] = None + outOfStockPercentageInInterval_gte: Optional[int] = None + packageDimension_lte: Optional[int] = None + packageDimension_gte: Optional[int] = None + packageHeight_lte: Optional[int] = None + packageHeight_gte: Optional[int] = None + packageLength_lte: Optional[int] = None + packageLength_gte: Optional[int] = None + packageQuantity_lte: Optional[int] = None + packageQuantity_gte: Optional[int] = None + packageWeight_lte: Optional[int] = None + packageWeight_gte: Optional[int] = None + packageWidth_lte: Optional[int] = None + packageWidth_gte: Optional[int] = None + partNumber: Optional[Union[List[str], str]] = None + platform: Optional[Union[List[str], str]] = None + productGroup: Optional[Union[List[str], str]] = None + productType: Optional[int] = None + publicationDate_lte: Optional[int] = None + publicationDate_gte: Optional[int] = None + publisher: Optional[Union[List[str], str]] = None + releaseDate_lte: Optional[int] = None + releaseDate_gte: Optional[int] = None + rootCategory: Optional[int] = None + salesRankDrops180_lte: Optional[int] = None + salesRankDrops180_gte: Optional[int] = None + salesRankDrops30_lte: Optional[int] = None + salesRankDrops30_gte: Optional[int] = None + salesRankDrops365_lte: Optional[int] = None + salesRankDrops365_gte: Optional[int] = None + salesRankDrops90_lte: Optional[int] = None + salesRankDrops90_gte: Optional[int] = None + salesRankReference: Optional[int] = None + salesRankTopPct_lte: Optional[int] = None + salesRankTopPct_gte: Optional[int] = None + sellerIds: Optional[Union[List[str], str]] = None + sellerIdsLowestFBA: Optional[Union[List[str], str]] = None + sellerIdsLowestFBM: Optional[Union[List[str], str]] = None + size: Optional[Union[List[str], str]] = None + studio: Optional[Union[List[str], str]] = None + title: Optional[str] = None + title_flag: Optional[str] = None + totalOfferCount_lte: Optional[int] = None + totalOfferCount_gte: Optional[int] = None + trackingSince_lte: Optional[int] = None + trackingSince_gte: Optional[int] = None + monthlySold_lte: Optional[int] = None + monthlySold_gte: Optional[int] = None + buyBoxIsPreorder: Optional[bool] = None + buyBoxIsBackorder: Optional[bool] = None + buyBoxIsPrimeExclusive: Optional[bool] = None + type: Optional[Union[List[str], str]] = None + warehouseCondition: Optional[int] = None + singleVariation: Optional[bool] = None + outOfStockPercentage90_lte: Optional[int] = None + outOfStockPercentage90_gte: Optional[int] = None + variationCount_lte: Optional[int] = None + variationCount_gte: Optional[int] = None + imageCount_lte: Optional[int] = None + imageCount_gte: Optional[int] = None + buyBoxStatsAmazon30_lte: Optional[int] = None + buyBoxStatsAmazon30_gte: Optional[int] = None + buyBoxStatsAmazon90_lte: Optional[int] = None + buyBoxStatsAmazon90_gte: Optional[int] = None + buyBoxStatsAmazon180_lte: Optional[int] = None + buyBoxStatsAmazon180_gte: Optional[int] = None + buyBoxStatsAmazon365_lte: Optional[int] = None + buyBoxStatsAmazon365_gte: Optional[int] = None + buyBoxStatsTopSeller30_lte: Optional[int] = None + buyBoxStatsTopSeller30_gte: Optional[int] = None + buyBoxStatsTopSeller90_lte: Optional[int] = None + buyBoxStatsTopSeller90_gte: Optional[int] = None + buyBoxStatsTopSeller180_lte: Optional[int] = None + buyBoxStatsTopSeller180_gte: Optional[int] = None + buyBoxStatsTopSeller365_lte: Optional[int] = None + buyBoxStatsTopSeller365_gte: Optional[int] = None + buyBoxStatsSellerCount30_lte: Optional[int] = None + buyBoxStatsSellerCount30_gte: Optional[int] = None + buyBoxStatsSellerCount90_lte: Optional[int] = None + buyBoxStatsSellerCount90_gte: Optional[int] = None + buyBoxStatsSellerCount180_lte: Optional[int] = None + buyBoxStatsSellerCount180_gte: Optional[int] = None + buyBoxStatsSellerCount365_lte: Optional[int] = None + buyBoxStatsSellerCount365_gte: Optional[int] = None + isHazMat: Optional[bool] = None diff --git a/src/keepa/interface.py b/src/keepa/interface.py index 1d22ea1..1b4d295 100644 --- a/src/keepa/interface.py +++ b/src/keepa/interface.py @@ -5,6 +5,7 @@ import json import logging import time +from enum import Enum from typing import Any, Dict, List, Optional, Sequence, Tuple, Union import aiohttp @@ -13,7 +14,8 @@ import requests from tqdm import tqdm -from keepa.query_keys import DEAL_REQUEST_KEYS, PRODUCT_REQUEST_KEYS +from keepa.data_models import ProductParams +from keepa.query_keys import DEAL_REQUEST_KEYS def is_documented_by(original): @@ -337,6 +339,44 @@ def format_items(items): return np.asarray([items]) +class Domain(Enum): + """Enumeration for Amazon domain regions. + + Examples + -------- + >>> import keepa + >>> keepa.Domain.US + + + """ + + RESERVED = "RESERVED" + US = "US" + GB = "GB" + DE = "DE" + FR = "FR" + JP = "JP" + CA = "CA" + RESERVED2 = "RESERVED2" + IT = "IT" + ES = "ES" + IN = "IN" + MX = "MX" + BR = "BR" + + +def _domain_to_dcode(domain: Union[str, Domain]) -> int: + """Convert a domain to a domain code.""" + if isinstance(domain, Domain): + domain_str = domain.value + else: + domain_str = domain + + if domain not in DCODES: + raise ValueError(f"Invalid domain code {domain}. Should be one of the following:\n{DCODES}") + return DCODES.index(domain_str) + + class Keepa: r"""Support a synchronous Python interface to keepa server. @@ -505,9 +545,8 @@ def query( timestamps (unix epoch time milliseconds) or two date strings (ISO8601, with or without time in UTC). - domain : str, default: "US" - One of the following Amazon domains: RESERVED, US, GB, DE, - FR, JP, CA, CN, IT, ES, IN, MX, BR. + domain : str | keepa.Domain, default: 'US' + A valid Amazon domain. See :class:`keepa.Domain`. history : bool, optional When set to True includes the price, sales, and offer @@ -877,9 +916,8 @@ def _product_query(self, items, product_code_is_asin=True, **kwargs): stats : int or date format Set the stats time for get sales rank inside this range - domain : str - One of the following Amazon domains: - RESERVED, US, GB, DE, FR, JP, CA, CN, IT, ES, IN, MX, BR. + domain : str | keepa.Domain, default: 'US' + A valid Amazon domain. See :class:`keepa.Domain`. offers : bool, optional Adds product offers to product data. @@ -928,7 +966,7 @@ def _product_query(self, items, product_code_is_asin=True, **kwargs): kwargs["code"] = ",".join(items) kwargs["key"] = self.accesskey - kwargs["domain"] = DCODES.index(kwargs["domain"]) + kwargs["domain"] = _domain_to_dcode(kwargs["domain"]) # Convert bool values to 0 and 1. kwargs["stock"] = int(kwargs["stock"]) @@ -982,7 +1020,9 @@ def _product_query(self, items, product_code_is_asin=True, **kwargs): return response - def best_sellers_query(self, category, rank_avg_range=0, domain="US", wait=True): + def best_sellers_query( + self, category, rank_avg_range=0, domain: Union[str, Domain] = "US", wait=True + ): """Retrieve an ASIN list of the most popular products. This is based on sales in a specific category or product group. See @@ -1015,9 +1055,8 @@ def best_sellers_query(self, category, rank_avg_range=0, domain="US", wait=True) the best sellers list for. You can find category node ids via the category search "search_for_categories". - domain : str, default: "US" - Amazon locale you want to access. Must be one of the following: - RESERVED, US, GB, DE, FR, JP, CA, CN, IT, ES, IN, MX, BR. + domain : str | keepa.Domain, default: 'US' + A valid Amazon domain. See :class:`keepa.Domain`. wait : bool, optional Wait available token before doing effective query. @@ -1070,14 +1109,9 @@ def best_sellers_query(self, category, rank_avg_range=0, domain="US", wait=True) ... """ - if domain not in DCODES: - raise ValueError( - f"Invalid domain code {domain}. Should be one of the following:\n{DCODES}" - ) - payload = { "key": self.accesskey, - "domain": DCODES.index(domain), + "domain": _domain_to_dcode(domain), "category": category, "range": rank_avg_range, } @@ -1088,7 +1122,9 @@ def best_sellers_query(self, category, rank_avg_range=0, domain="US", wait=True) else: # pragma: no cover log.info("Best sellers search results not yet available") - def search_for_categories(self, searchterm, domain="US", wait=True) -> list: + def search_for_categories( + self, searchterm, domain: Union[str, Domain] = "US", wait=True + ) -> list: """Search for categories from Amazon. Parameters @@ -1096,9 +1132,8 @@ def search_for_categories(self, searchterm, domain="US", wait=True) -> list: searchterm : str Input search term. - domain : str, default: "US" - Amazon locale you want to access. Must be one of the following: - RESERVED, US, GB, DE, FR, JP, CA, CN, IT, ES, IN, MX, BR. + domain : str | keepa.Domain, default: 'US' + A valid Amazon domain. See :class:`keepa.Domain`. wait : bool, default: True Wait available token before doing effective query. @@ -1131,14 +1166,9 @@ def search_for_categories(self, searchterm, domain="US", wait=True) -> list: 144 Science Fiction & Fantasy """ - if domain not in DCODES: - raise ValueError( - f"Invalid domain code {domain}. Should be one of the following:\n{DCODES}" - ) - payload = { "key": self.accesskey, - "domain": DCODES.index(domain), + "domain": _domain_to_dcode(domain), "type": "category", "term": searchterm, } @@ -1150,7 +1180,9 @@ def search_for_categories(self, searchterm, domain="US", wait=True) -> list: ) return response["categories"] - def category_lookup(self, category_id, domain="US", include_parents=False, wait=True): + def category_lookup( + self, category_id, domain: Union[str, Domain] = "US", include_parents=False, wait=True + ): """Return root categories given a categoryId. Parameters @@ -1159,9 +1191,8 @@ def category_lookup(self, category_id, domain="US", include_parents=False, wait= ID for specific category or 0 to return a list of root categories. - domain : str, default: "US" - Amazon locale you want to access. Must be one of the following: - RESERVED, US, GB, DE, FR, JP, CA, CN, IT, ES, IN, MX, BR. + domain : str | keepa.Domain, default: 'US' + A valid Amazon domain. See :class:`keepa.Domain`. include_parents : bool, default: False Include parents. @@ -1207,14 +1238,9 @@ def category_lookup(self, category_id, domain="US", include_parents=False, wait= 'matched': True} """ - if domain not in DCODES: - raise ValueError( - f"Invalid domain code {domain}. Should be one of the following:\n{DCODES}" - ) - payload = { "key": self.accesskey, - "domain": DCODES.index(domain), + "domain": _domain_to_dcode(domain), "category": category_id, "parents": int(include_parents), } @@ -1227,7 +1253,7 @@ def category_lookup(self, category_id, domain="US", include_parents=False, wait= def seller_query( self, seller_id, - domain="US", + domain: Union[str, Domain] = "US", to_datetime=True, storefront=False, update=None, @@ -1248,9 +1274,8 @@ def seller_query( profile pages in the seller parameter of the URL as well as in the offers results from a product query. - domain : str, optional - One of the following Amazon domains: RESERVED, US, GB, DE, - FR, JP, CA, CN, IT, ES, IN, MX Defaults to US. + domain : str | keepa.Domain, default: 'US' + A valid Amazon domain. See :class:`keepa.Domain`. storefront : bool, optional If specified the seller object will contain additional @@ -1320,7 +1345,7 @@ def seller_query( payload = { "key": self.accesskey, - "domain": DCODES.index(domain), + "domain": _domain_to_dcode(domain), "seller": seller, } @@ -1332,1035 +1357,31 @@ def seller_query( response = self._request("seller", payload, wait=wait) return _parse_seller(response["sellers"], to_datetime) - def product_finder(self, product_parms, domain="US", wait=True, n_products=50) -> list: + def product_finder( + self, + product_parms: Union[Dict[str, Any], ProductParams], + domain: Union[str, Domain] = "US", + wait=True, + n_products=50, + ) -> List[str]: """Query the keepa product database to find products matching criteria. - Almost all product fields can be searched for and sort. + Almost all product fields can be searched for and sorted. Parameters ---------- - product_parms : dict - Dictionary containing one or more of the following keys: - - - ``'author': str`` - - ``'availabilityAmazon': int`` - - ``'avg180_AMAZON_lte': int`` - - ``'avg180_AMAZON_gte': int`` - - ``'avg180_BUY_BOX_SHIPPING_lte': int`` - - ``'avg180_BUY_BOX_SHIPPING_gte': int`` - - ``'avg180_COLLECTIBLE_lte': int`` - - ``'avg180_COLLECTIBLE_gte': int`` - - ``'avg180_COUNT_COLLECTIBLE_lte': int`` - - ``'avg180_COUNT_COLLECTIBLE_gte': int`` - - ``'avg180_COUNT_NEW_lte': int`` - - ``'avg180_COUNT_NEW_gte': int`` - - ``'avg180_COUNT_REFURBISHED_lte': int`` - - ``'avg180_COUNT_REFURBISHED_gte': int`` - - ``'avg180_COUNT_REVIEWS_lte': int`` - - ``'avg180_COUNT_REVIEWS_gte': int`` - - ``'avg180_COUNT_USED_lte': int`` - - ``'avg180_COUNT_USED_gte': int`` - - ``'avg180_EBAY_NEW_SHIPPING_lte': int`` - - ``'avg180_EBAY_NEW_SHIPPING_gte': int`` - - ``'avg180_EBAY_USED_SHIPPING_lte': int`` - - ``'avg180_EBAY_USED_SHIPPING_gte': int`` - - ``'avg180_LIGHTNING_DEAL_lte': int`` - - ``'avg180_LIGHTNING_DEAL_gte': int`` - - ``'avg180_LISTPRICE_lte': int`` - - ``'avg180_LISTPRICE_gte': int`` - - ``'avg180_NEW_lte': int`` - - ``'avg180_NEW_gte': int`` - - ``'avg180_NEW_FBA_lte': int`` - - ``'avg180_NEW_FBA_gte': int`` - - ``'avg180_NEW_FBM_SHIPPING_lte': int`` - - ``'avg180_NEW_FBM_SHIPPING_gte': int`` - - ``'avg180_RATING_lte': int`` - - ``'avg180_RATING_gte': int`` - - ``'avg180_REFURBISHED_lte': int`` - - ``'avg180_REFURBISHED_gte': int`` - - ``'avg180_REFURBISHED_SHIPPING_lte': int`` - - ``'avg180_REFURBISHED_SHIPPING_gte': int`` - - ``'avg180_RENT_lte': int`` - - ``'avg180_RENT_gte': int`` - - ``'avg180_SALES_lte': int`` - - ``'avg180_SALES_gte': int`` - - ``'avg180_TRADE_IN_lte': int`` - - ``'avg180_TRADE_IN_gte': int`` - - ``'avg180_USED_lte': int`` - - ``'avg180_USED_gte': int`` - - ``'avg180_USED_ACCEPTABLE_SHIPPING_lte': int`` - - ``'avg180_USED_ACCEPTABLE_SHIPPING_gte': int`` - - ``'avg180_USED_GOOD_SHIPPING_lte': int`` - - ``'avg180_USED_GOOD_SHIPPING_gte': int`` - - ``'avg180_USED_NEW_SHIPPING_lte': int`` - - ``'avg180_USED_NEW_SHIPPING_gte': int`` - - ``'avg180_USED_VERY_GOOD_SHIPPING_lte': int`` - - ``'avg180_USED_VERY_GOOD_SHIPPING_gte': int`` - - ``'avg180_WAREHOUSE_lte': int`` - - ``'avg180_WAREHOUSE_gte': int`` - - ``'avg1_AMAZON_lte': int`` - - ``'avg1_AMAZON_gte': int`` - - ``'avg1_BUY_BOX_SHIPPING_lte': int`` - - ``'avg1_BUY_BOX_SHIPPING_gte': int`` - - ``'avg1_COLLECTIBLE_lte': int`` - - ``'avg1_COLLECTIBLE_gte': int`` - - ``'avg1_COUNT_COLLECTIBLE_lte': int`` - - ``'avg1_COUNT_COLLECTIBLE_gte': int`` - - ``'avg1_COUNT_NEW_lte': int`` - - ``'avg1_COUNT_NEW_gte': int`` - - ``'avg1_COUNT_REFURBISHED_lte': int`` - - ``'avg1_COUNT_REFURBISHED_gte': int`` - - ``'avg1_COUNT_REVIEWS_lte': int`` - - ``'avg1_COUNT_REVIEWS_gte': int`` - - ``'avg1_COUNT_USED_lte': int`` - - ``'avg1_COUNT_USED_gte': int`` - - ``'avg1_EBAY_NEW_SHIPPING_lte': int`` - - ``'avg1_EBAY_NEW_SHIPPING_gte': int`` - - ``'avg1_EBAY_USED_SHIPPING_lte': int`` - - ``'avg1_EBAY_USED_SHIPPING_gte': int`` - - ``'avg1_LIGHTNING_DEAL_lte': int`` - - ``'avg1_LIGHTNING_DEAL_gte': int`` - - ``'avg1_LISTPRICE_lte': int`` - - ``'avg1_LISTPRICE_gte': int`` - - ``'avg1_NEW_lte': int`` - - ``'avg1_NEW_gte': int`` - - ``'avg1_NEW_FBA_lte': int`` - - ``'avg1_NEW_FBA_gte': int`` - - ``'avg1_NEW_FBM_SHIPPING_lte': int`` - - ``'avg1_NEW_FBM_SHIPPING_gte': int`` - - ``'avg1_RATING_lte': int`` - - ``'avg1_RATING_gte': int`` - - ``'avg1_REFURBISHED_lte': int`` - - ``'avg1_REFURBISHED_gte': int`` - - ``'avg1_REFURBISHED_SHIPPING_lte': int`` - - ``'avg1_REFURBISHED_SHIPPING_gte': int`` - - ``'avg1_RENT_lte': int`` - - ``'avg1_RENT_gte': int`` - - ``'avg1_SALES_lte': int`` - - ``'avg1_SALES_lte': int`` - - ``'avg1_SALES_gte': int`` - - ``'avg1_TRADE_IN_lte': int`` - - ``'avg1_TRADE_IN_gte': int`` - - ``'avg1_USED_lte': int`` - - ``'avg1_USED_gte': int`` - - ``'avg1_USED_ACCEPTABLE_SHIPPING_lte': int`` - - ``'avg1_USED_ACCEPTABLE_SHIPPING_gte': int`` - - ``'avg1_USED_GOOD_SHIPPING_lte': int`` - - ``'avg1_USED_GOOD_SHIPPING_gte': int`` - - ``'avg1_USED_NEW_SHIPPING_lte': int`` - - ``'avg1_USED_NEW_SHIPPING_gte': int`` - - ``'avg1_USED_VERY_GOOD_SHIPPING_lte': int`` - - ``'avg1_USED_VERY_GOOD_SHIPPING_gte': int`` - - ``'avg1_WAREHOUSE_lte': int`` - - ``'avg1_WAREHOUSE_gte': int`` - - ``'avg30_AMAZON_lte': int`` - - ``'avg30_AMAZON_gte': int`` - - ``'avg30_BUY_BOX_SHIPPING_lte': int`` - - ``'avg30_BUY_BOX_SHIPPING_gte': int`` - - ``'avg30_COLLECTIBLE_lte': int`` - - ``'avg30_COLLECTIBLE_gte': int`` - - ``'avg30_COUNT_COLLECTIBLE_lte': int`` - - ``'avg30_COUNT_COLLECTIBLE_gte': int`` - - ``'avg30_COUNT_NEW_lte': int`` - - ``'avg30_COUNT_NEW_gte': int`` - - ``'avg30_COUNT_REFURBISHED_lte': int`` - - ``'avg30_COUNT_REFURBISHED_gte': int`` - - ``'avg30_COUNT_REVIEWS_lte': int`` - - ``'avg30_COUNT_REVIEWS_gte': int`` - - ``'avg30_COUNT_USED_lte': int`` - - ``'avg30_COUNT_USED_gte': int`` - - ``'avg30_EBAY_NEW_SHIPPING_lte': int`` - - ``'avg30_EBAY_NEW_SHIPPING_gte': int`` - - ``'avg30_EBAY_USED_SHIPPING_lte': int`` - - ``'avg30_EBAY_USED_SHIPPING_gte': int`` - - ``'avg30_LIGHTNING_DEAL_lte': int`` - - ``'avg30_LIGHTNING_DEAL_gte': int`` - - ``'avg30_LISTPRICE_lte': int`` - - ``'avg30_LISTPRICE_gte': int`` - - ``'avg30_NEW_lte': int`` - - ``'avg30_NEW_gte': int`` - - ``'avg30_NEW_FBA_lte': int`` - - ``'avg30_NEW_FBA_gte': int`` - - ``'avg30_NEW_FBM_SHIPPING_lte': int`` - - ``'avg30_NEW_FBM_SHIPPING_gte': int`` - - ``'avg30_RATING_lte': int`` - - ``'avg30_RATING_gte': int`` - - ``'avg30_REFURBISHED_lte': int`` - - ``'avg30_REFURBISHED_gte': int`` - - ``'avg30_REFURBISHED_SHIPPING_lte': int`` - - ``'avg30_REFURBISHED_SHIPPING_gte': int`` - - ``'avg30_RENT_lte': int`` - - ``'avg30_RENT_gte': int`` - - ``'avg30_SALES_lte': int`` - - ``'avg30_SALES_gte': int`` - - ``'avg30_TRADE_IN_lte': int`` - - ``'avg30_TRADE_IN_gte': int`` - - ``'avg30_USED_lte': int`` - - ``'avg30_USED_gte': int`` - - ``'avg30_USED_ACCEPTABLE_SHIPPING_lte': int`` - - ``'avg30_USED_ACCEPTABLE_SHIPPING_gte': int`` - - ``'avg30_USED_GOOD_SHIPPING_lte': int`` - - ``'avg30_USED_GOOD_SHIPPING_gte': int`` - - ``'avg30_USED_NEW_SHIPPING_lte': int`` - - ``'avg30_USED_NEW_SHIPPING_gte': int`` - - ``'avg30_USED_VERY_GOOD_SHIPPING_lte': int`` - - ``'avg30_USED_VERY_GOOD_SHIPPING_gte': int`` - - ``'avg30_WAREHOUSE_lte': int`` - - ``'avg30_WAREHOUSE_gte': int`` - - ``'avg7_AMAZON_lte': int`` - - ``'avg7_AMAZON_gte': int`` - - ``'avg7_BUY_BOX_SHIPPING_lte': int`` - - ``'avg7_BUY_BOX_SHIPPING_gte': int`` - - ``'avg7_COLLECTIBLE_lte': int`` - - ``'avg7_COLLECTIBLE_gte': int`` - - ``'avg7_COUNT_COLLECTIBLE_lte': int`` - - ``'avg7_COUNT_COLLECTIBLE_gte': int`` - - ``'avg7_COUNT_NEW_lte': int`` - - ``'avg7_COUNT_NEW_gte': int`` - - ``'avg7_COUNT_REFURBISHED_lte': int`` - - ``'avg7_COUNT_REFURBISHED_gte': int`` - - ``'avg7_COUNT_REVIEWS_lte': int`` - - ``'avg7_COUNT_REVIEWS_gte': int`` - - ``'avg7_COUNT_USED_lte': int`` - - ``'avg7_COUNT_USED_gte': int`` - - ``'avg7_EBAY_NEW_SHIPPING_lte': int`` - - ``'avg7_EBAY_NEW_SHIPPING_gte': int`` - - ``'avg7_EBAY_USED_SHIPPING_lte': int`` - - ``'avg7_EBAY_USED_SHIPPING_gte': int`` - - ``'avg7_LIGHTNING_DEAL_lte': int`` - - ``'avg7_LIGHTNING_DEAL_gte': int`` - - ``'avg7_LISTPRICE_lte': int`` - - ``'avg7_LISTPRICE_gte': int`` - - ``'avg7_NEW_lte': int`` - - ``'avg7_NEW_gte': int`` - - ``'avg7_NEW_FBA_lte': int`` - - ``'avg7_NEW_FBA_gte': int`` - - ``'avg7_NEW_FBM_SHIPPING_lte': int`` - - ``'avg7_NEW_FBM_SHIPPING_gte': int`` - - ``'avg7_RATING_lte': int`` - - ``'avg7_RATING_gte': int`` - - ``'avg7_REFURBISHED_lte': int`` - - ``'avg7_REFURBISHED_gte': int`` - - ``'avg7_REFURBISHED_SHIPPING_lte': int`` - - ``'avg7_REFURBISHED_SHIPPING_gte': int`` - - ``'avg7_RENT_lte': int`` - - ``'avg7_RENT_gte': int`` - - ``'avg7_SALES_lte': int`` - - ``'avg7_SALES_gte': int`` - - ``'avg7_TRADE_IN_lte': int`` - - ``'avg7_TRADE_IN_gte': int`` - - ``'avg7_USED_lte': int`` - - ``'avg7_USED_gte': int`` - - ``'avg7_USED_ACCEPTABLE_SHIPPING_lte': int`` - - ``'avg7_USED_ACCEPTABLE_SHIPPING_gte': int`` - - ``'avg7_USED_GOOD_SHIPPING_lte': int`` - - ``'avg7_USED_GOOD_SHIPPING_gte': int`` - - ``'avg7_USED_NEW_SHIPPING_lte': int`` - - ``'avg7_USED_NEW_SHIPPING_gte': int`` - - ``'avg7_USED_VERY_GOOD_SHIPPING_lte': int`` - - ``'avg7_USED_VERY_GOOD_SHIPPING_gte': int`` - - ``'avg7_WAREHOUSE_lte': int`` - - ``'avg7_WAREHOUSE_gte': int`` - - ``'avg90_AMAZON_lte': int`` - - ``'avg90_AMAZON_gte': int`` - - ``'avg90_BUY_BOX_SHIPPING_lte': int`` - - ``'avg90_BUY_BOX_SHIPPING_gte': int`` - - ``'avg90_COLLECTIBLE_lte': int`` - - ``'avg90_COLLECTIBLE_gte': int`` - - ``'avg90_COUNT_COLLECTIBLE_lte': int`` - - ``'avg90_COUNT_COLLECTIBLE_gte': int`` - - ``'avg90_COUNT_NEW_lte': int`` - - ``'avg90_COUNT_NEW_gte': int`` - - ``'avg90_COUNT_REFURBISHED_lte': int`` - - ``'avg90_COUNT_REFURBISHED_gte': int`` - - ``'avg90_COUNT_REVIEWS_lte': int`` - - ``'avg90_COUNT_REVIEWS_gte': int`` - - ``'avg90_COUNT_USED_lte': int`` - - ``'avg90_COUNT_USED_gte': int`` - - ``'avg90_EBAY_NEW_SHIPPING_lte': int`` - - ``'avg90_EBAY_NEW_SHIPPING_gte': int`` - - ``'avg90_EBAY_USED_SHIPPING_lte': int`` - - ``'avg90_EBAY_USED_SHIPPING_gte': int`` - - ``'avg90_LIGHTNING_DEAL_lte': int`` - - ``'avg90_LIGHTNING_DEAL_gte': int`` - - ``'avg90_LISTPRICE_lte': int`` - - ``'avg90_LISTPRICE_gte': int`` - - ``'avg90_NEW_lte': int`` - - ``'avg90_NEW_gte': int`` - - ``'avg90_NEW_FBA_lte': int`` - - ``'avg90_NEW_FBA_gte': int`` - - ``'avg90_NEW_FBM_SHIPPING_lte': int`` - - ``'avg90_NEW_FBM_SHIPPING_gte': int`` - - ``'avg90_RATING_lte': int`` - - ``'avg90_RATING_gte': int`` - - ``'avg90_REFURBISHED_lte': int`` - - ``'avg90_REFURBISHED_gte': int`` - - ``'avg90_REFURBISHED_SHIPPING_lte': int`` - - ``'avg90_REFURBISHED_SHIPPING_gte': int`` - - ``'avg90_RENT_lte': int`` - - ``'avg90_RENT_gte': int`` - - ``'avg90_SALES_lte': int`` - - ``'avg90_SALES_gte': int`` - - ``'avg90_TRADE_IN_lte': int`` - - ``'avg90_TRADE_IN_gte': int`` - - ``'avg90_USED_lte': int`` - - ``'avg90_USED_gte': int`` - - ``'avg90_USED_ACCEPTABLE_SHIPPING_lte': int`` - - ``'avg90_USED_ACCEPTABLE_SHIPPING_gte': int`` - - ``'avg90_USED_GOOD_SHIPPING_lte': int`` - - ``'avg90_USED_GOOD_SHIPPING_gte': int`` - - ``'avg90_USED_NEW_SHIPPING_lte': int`` - - ``'avg90_USED_NEW_SHIPPING_gte': int`` - - ``'avg90_USED_VERY_GOOD_SHIPPING_lte': int`` - - ``'avg90_USED_VERY_GOOD_SHIPPING_gte': int`` - - ``'avg90_WAREHOUSE_lte': int`` - - ``'avg90_WAREHOUSE_gte': int`` - - ``'backInStock_AMAZON': bool`` - - ``'backInStock_BUY_BOX_SHIPPING': bool`` - - ``'backInStock_COLLECTIBLE': bool`` - - ``'backInStock_COUNT_COLLECTIBLE': bool`` - - ``'backInStock_COUNT_NEW': bool`` - - ``'backInStock_COUNT_REFURBISHED': bool`` - - ``'backInStock_COUNT_REVIEWS': bool`` - - ``'backInStock_COUNT_USED': bool`` - - ``'backInStock_EBAY_NEW_SHIPPING': bool`` - - ``'backInStock_EBAY_USED_SHIPPING': bool`` - - ``'backInStock_LIGHTNING_DEAL': bool`` - - ``'backInStock_LISTPRICE': bool`` - - ``'backInStock_NEW': bool`` - - ``'backInStock_NEW_FBA': bool`` - - ``'backInStock_NEW_FBM_SHIPPING': bool`` - - ``'backInStock_RATING': bool`` - - ``'backInStock_REFURBISHED': bool`` - - ``'backInStock_REFURBISHED_SHIPPING': bool`` - - ``'backInStock_RENT': bool`` - - ``'backInStock_SALES': bool`` - - ``'backInStock_TRADE_IN': bool`` - - ``'backInStock_USED': bool`` - - ``'backInStock_USED_ACCEPTABLE_SHIPPING': bool`` - - ``'backInStock_USED_GOOD_SHIPPING': bool`` - - ``'backInStock_USED_NEW_SHIPPING': bool`` - - ``'backInStock_USED_VERY_GOOD_SHIPPING': bool`` - - ``'backInStock_WAREHOUSE': bool`` - - ``'binding': str`` - - ``'brand': str`` - - ``'buyBoxSellerId': str`` - - ``'color': str`` - - ``'couponOneTimeAbsolute_lte': int`` - - ``'couponOneTimeAbsolute_gte': int`` - - ``'couponOneTimePercent_lte': int`` - - ``'couponOneTimePercent_gte': int`` - - ``'couponSNSAbsolute_lte': int`` - - ``'couponSNSAbsolute_gte': int`` - - ``'couponSNSPercent_lte': int`` - - ``'couponSNSPercent_gte': int`` - - ``'current_AMAZON_lte': int`` - - ``'current_AMAZON_gte': int`` - - ``'current_BUY_BOX_SHIPPING_lte': int`` - - ``'current_BUY_BOX_SHIPPING_gte': int`` - - ``'current_COLLECTIBLE_lte': int`` - - ``'current_COLLECTIBLE_gte': int`` - - ``'current_COUNT_COLLECTIBLE_lte': int`` - - ``'current_COUNT_COLLECTIBLE_gte': int`` - - ``'current_COUNT_NEW_lte': int`` - - ``'current_COUNT_NEW_gte': int`` - - ``'current_COUNT_REFURBISHED_lte': int`` - - ``'current_COUNT_REFURBISHED_gte': int`` - - ``'current_COUNT_REVIEWS_lte': int`` - - ``'current_COUNT_REVIEWS_gte': int`` - - ``'current_COUNT_USED_lte': int`` - - ``'current_COUNT_USED_gte': int`` - - ``'current_EBAY_NEW_SHIPPING_lte': int`` - - ``'current_EBAY_NEW_SHIPPING_gte': int`` - - ``'current_EBAY_USED_SHIPPING_lte': int`` - - ``'current_EBAY_USED_SHIPPING_gte': int`` - - ``'current_LIGHTNING_DEAL_lte': int`` - - ``'current_LIGHTNING_DEAL_gte': int`` - - ``'current_LISTPRICE_lte': int`` - - ``'current_LISTPRICE_gte': int`` - - ``'current_NEW_lte': int`` - - ``'current_NEW_gte': int`` - - ``'current_NEW_FBA_lte': int`` - - ``'current_NEW_FBA_gte': int`` - - ``'current_NEW_FBM_SHIPPING_lte': int`` - - ``'current_NEW_FBM_SHIPPING_gte': int`` - - ``'current_RATING_lte': int`` - - ``'current_RATING_gte': int`` - - ``'current_REFURBISHED_lte': int`` - - ``'current_REFURBISHED_gte': int`` - - ``'current_REFURBISHED_SHIPPING_lte': int`` - - ``'current_REFURBISHED_SHIPPING_gte': int`` - - ``'current_RENT_lte': int`` - - ``'current_RENT_gte': int`` - - ``'current_SALES_lte': int`` - - ``'current_SALES_gte': int`` - - ``'current_TRADE_IN_lte': int`` - - ``'current_TRADE_IN_gte': int`` - - ``'current_USED_lte': int`` - - ``'current_USED_gte': int`` - - ``'current_USED_ACCEPTABLE_SHIPPING_lte': int`` - - ``'current_USED_ACCEPTABLE_SHIPPING_gte': int`` - - ``'current_USED_GOOD_SHIPPING_lte': int`` - - ``'current_USED_GOOD_SHIPPING_gte': int`` - - ``'current_USED_NEW_SHIPPING_lte': int`` - - ``'current_USED_NEW_SHIPPING_gte': int`` - - ``'current_USED_VERY_GOOD_SHIPPING_lte': int`` - - ``'current_USED_VERY_GOOD_SHIPPING_gte': int`` - - ``'current_WAREHOUSE_lte': int`` - - ``'current_WAREHOUSE_gte': int`` - - ``'delta1_AMAZON_lte': int`` - - ``'delta1_AMAZON_gte': int`` - - ``'delta1_BUY_BOX_SHIPPING_lte': int`` - - ``'delta1_BUY_BOX_SHIPPING_gte': int`` - - ``'delta1_COLLECTIBLE_lte': int`` - - ``'delta1_COLLECTIBLE_gte': int`` - - ``'delta1_COUNT_COLLECTIBLE_lte': int`` - - ``'delta1_COUNT_COLLECTIBLE_gte': int`` - - ``'delta1_COUNT_NEW_lte': int`` - - ``'delta1_COUNT_NEW_gte': int`` - - ``'delta1_COUNT_REFURBISHED_lte': int`` - - ``'delta1_COUNT_REFURBISHED_gte': int`` - - ``'delta1_COUNT_REVIEWS_lte': int`` - - ``'delta1_COUNT_REVIEWS_gte': int`` - - ``'delta1_COUNT_USED_lte': int`` - - ``'delta1_COUNT_USED_gte': int`` - - ``'delta1_EBAY_NEW_SHIPPING_lte': int`` - - ``'delta1_EBAY_NEW_SHIPPING_gte': int`` - - ``'delta1_EBAY_USED_SHIPPING_lte': int`` - - ``'delta1_EBAY_USED_SHIPPING_gte': int`` - - ``'delta1_LIGHTNING_DEAL_lte': int`` - - ``'delta1_LIGHTNING_DEAL_gte': int`` - - ``'delta1_LISTPRICE_lte': int`` - - ``'delta1_LISTPRICE_gte': int`` - - ``'delta1_NEW_lte': int`` - - ``'delta1_NEW_gte': int`` - - ``'delta1_NEW_FBA_lte': int`` - - ``'delta1_NEW_FBA_gte': int`` - - ``'delta1_NEW_FBM_SHIPPING_lte': int`` - - ``'delta1_NEW_FBM_SHIPPING_gte': int`` - - ``'delta1_RATING_lte': int`` - - ``'delta1_RATING_gte': int`` - - ``'delta1_REFURBISHED_lte': int`` - - ``'delta1_REFURBISHED_gte': int`` - - ``'delta1_REFURBISHED_SHIPPING_lte': int`` - - ``'delta1_REFURBISHED_SHIPPING_gte': int`` - - ``'delta1_RENT_lte': int`` - - ``'delta1_RENT_gte': int`` - - ``'delta1_SALES_lte': int`` - - ``'delta1_SALES_gte': int`` - - ``'delta1_TRADE_IN_lte': int`` - - ``'delta1_TRADE_IN_gte': int`` - - ``'delta1_USED_lte': int`` - - ``'delta1_USED_gte': int`` - - ``'delta1_USED_ACCEPTABLE_SHIPPING_lte': int`` - - ``'delta1_USED_ACCEPTABLE_SHIPPING_gte': int`` - - ``'delta1_USED_GOOD_SHIPPING_lte': int`` - - ``'delta1_USED_GOOD_SHIPPING_gte': int`` - - ``'delta1_USED_NEW_SHIPPING_lte': int`` - - ``'delta1_USED_NEW_SHIPPING_gte': int`` - - ``'delta1_USED_VERY_GOOD_SHIPPING_lte': int`` - - ``'delta1_USED_VERY_GOOD_SHIPPING_gte': int`` - - ``'delta1_WAREHOUSE_lte': int`` - - ``'delta1_WAREHOUSE_gte': int`` - - ``'delta30_AMAZON_lte': int`` - - ``'delta30_AMAZON_gte': int`` - - ``'delta30_BUY_BOX_SHIPPING_lte': int`` - - ``'delta30_BUY_BOX_SHIPPING_gte': int`` - - ``'delta30_COLLECTIBLE_lte': int`` - - ``'delta30_COLLECTIBLE_gte': int`` - - ``'delta30_COUNT_COLLECTIBLE_lte': int`` - - ``'delta30_COUNT_COLLECTIBLE_gte': int`` - - ``'delta30_COUNT_NEW_lte': int`` - - ``'delta30_COUNT_NEW_gte': int`` - - ``'delta30_COUNT_REFURBISHED_lte': int`` - - ``'delta30_COUNT_REFURBISHED_gte': int`` - - ``'delta30_COUNT_REVIEWS_lte': int`` - - ``'delta30_COUNT_REVIEWS_gte': int`` - - ``'delta30_COUNT_USED_lte': int`` - - ``'delta30_COUNT_USED_gte': int`` - - ``'delta30_EBAY_NEW_SHIPPING_lte': int`` - - ``'delta30_EBAY_NEW_SHIPPING_gte': int`` - - ``'delta30_EBAY_USED_SHIPPING_lte': int`` - - ``'delta30_EBAY_USED_SHIPPING_gte': int`` - - ``'delta30_LIGHTNING_DEAL_lte': int`` - - ``'delta30_LIGHTNING_DEAL_gte': int`` - - ``'delta30_LISTPRICE_lte': int`` - - ``'delta30_LISTPRICE_gte': int`` - - ``'delta30_NEW_lte': int`` - - ``'delta30_NEW_gte': int`` - - ``'delta30_NEW_FBA_lte': int`` - - ``'delta30_NEW_FBA_gte': int`` - - ``'delta30_NEW_FBM_SHIPPING_lte': int`` - - ``'delta30_NEW_FBM_SHIPPING_gte': int`` - - ``'delta30_RATING_lte': int`` - - ``'delta30_RATING_gte': int`` - - ``'delta30_REFURBISHED_lte': int`` - - ``'delta30_REFURBISHED_gte': int`` - - ``'delta30_REFURBISHED_SHIPPING_lte': int`` - - ``'delta30_REFURBISHED_SHIPPING_gte': int`` - - ``'delta30_RENT_lte': int`` - - ``'delta30_RENT_gte': int`` - - ``'delta30_SALES_lte': int`` - - ``'delta30_SALES_gte': int`` - - ``'delta30_TRADE_IN_lte': int`` - - ``'delta30_TRADE_IN_gte': int`` - - ``'delta30_USED_lte': int`` - - ``'delta30_USED_gte': int`` - - ``'delta30_USED_ACCEPTABLE_SHIPPING_lte': int`` - - ``'delta30_USED_ACCEPTABLE_SHIPPING_gte': int`` - - ``'delta30_USED_GOOD_SHIPPING_lte': int`` - - ``'delta30_USED_GOOD_SHIPPING_gte': int`` - - ``'delta30_USED_NEW_SHIPPING_lte': int`` - - ``'delta30_USED_NEW_SHIPPING_gte': int`` - - ``'delta30_USED_VERY_GOOD_SHIPPING_lte': int`` - - ``'delta30_USED_VERY_GOOD_SHIPPING_gte': int`` - - ``'delta30_WAREHOUSE_lte': int`` - - ``'delta30_WAREHOUSE_gte': int`` - - ``'delta7_AMAZON_lte': int`` - - ``'delta7_AMAZON_gte': int`` - - ``'delta7_BUY_BOX_SHIPPING_lte': int`` - - ``'delta7_BUY_BOX_SHIPPING_gte': int`` - - ``'delta7_COLLECTIBLE_lte': int`` - - ``'delta7_COLLECTIBLE_gte': int`` - - ``'delta7_COUNT_COLLECTIBLE_lte': int`` - - ``'delta7_COUNT_COLLECTIBLE_gte': int`` - - ``'delta7_COUNT_NEW_lte': int`` - - ``'delta7_COUNT_NEW_gte': int`` - - ``'delta7_COUNT_REFURBISHED_lte': int`` - - ``'delta7_COUNT_REFURBISHED_gte': int`` - - ``'delta7_COUNT_REVIEWS_lte': int`` - - ``'delta7_COUNT_REVIEWS_gte': int`` - - ``'delta7_COUNT_USED_lte': int`` - - ``'delta7_COUNT_USED_gte': int`` - - ``'delta7_EBAY_NEW_SHIPPING_lte': int`` - - ``'delta7_EBAY_NEW_SHIPPING_gte': int`` - - ``'delta7_EBAY_USED_SHIPPING_lte': int`` - - ``'delta7_EBAY_USED_SHIPPING_gte': int`` - - ``'delta7_LIGHTNING_DEAL_lte': int`` - - ``'delta7_LIGHTNING_DEAL_gte': int`` - - ``'delta7_LISTPRICE_lte': int`` - - ``'delta7_LISTPRICE_gte': int`` - - ``'delta7_NEW_lte': int`` - - ``'delta7_NEW_gte': int`` - - ``'delta7_NEW_FBA_lte': int`` - - ``'delta7_NEW_FBA_gte': int`` - - ``'delta7_NEW_FBM_SHIPPING_lte': int`` - - ``'delta7_NEW_FBM_SHIPPING_gte': int`` - - ``'delta7_RATING_lte': int`` - - ``'delta7_RATING_gte': int`` - - ``'delta7_REFURBISHED_lte': int`` - - ``'delta7_REFURBISHED_gte': int`` - - ``'delta7_REFURBISHED_SHIPPING_lte': int`` - - ``'delta7_REFURBISHED_SHIPPING_gte': int`` - - ``'delta7_RENT_lte': int`` - - ``'delta7_RENT_gte': int`` - - ``'delta7_SALES_lte': int`` - - ``'delta7_SALES_gte': int`` - - ``'delta7_TRADE_IN_lte': int`` - - ``'delta7_TRADE_IN_gte': int`` - - ``'delta7_USED_lte': int`` - - ``'delta7_USED_gte': int`` - - ``'delta7_USED_ACCEPTABLE_SHIPPING_lte': int`` - - ``'delta7_USED_ACCEPTABLE_SHIPPING_gte': int`` - - ``'delta7_USED_GOOD_SHIPPING_lte': int`` - - ``'delta7_USED_GOOD_SHIPPING_gte': int`` - - ``'delta7_USED_NEW_SHIPPING_lte': int`` - - ``'delta7_USED_NEW_SHIPPING_gte': int`` - - ``'delta7_USED_VERY_GOOD_SHIPPING_lte': int`` - - ``'delta7_USED_VERY_GOOD_SHIPPING_gte': int`` - - ``'delta7_WAREHOUSE_lte': int`` - - ``'delta7_WAREHOUSE_gte': int`` - - ``'delta90_AMAZON_lte': int`` - - ``'delta90_AMAZON_gte': int`` - - ``'delta90_BUY_BOX_SHIPPING_lte': int`` - - ``'delta90_BUY_BOX_SHIPPING_gte': int`` - - ``'delta90_COLLECTIBLE_lte': int`` - - ``'delta90_COLLECTIBLE_gte': int`` - - ``'delta90_COUNT_COLLECTIBLE_lte': int`` - - ``'delta90_COUNT_COLLECTIBLE_gte': int`` - - ``'delta90_COUNT_NEW_lte': int`` - - ``'delta90_COUNT_NEW_gte': int`` - - ``'delta90_COUNT_REFURBISHED_lte': int`` - - ``'delta90_COUNT_REFURBISHED_gte': int`` - - ``'delta90_COUNT_REVIEWS_lte': int`` - - ``'delta90_COUNT_REVIEWS_gte': int`` - - ``'delta90_COUNT_USED_lte': int`` - - ``'delta90_COUNT_USED_gte': int`` - - ``'delta90_EBAY_NEW_SHIPPING_lte': int`` - - ``'delta90_EBAY_NEW_SHIPPING_gte': int`` - - ``'delta90_EBAY_USED_SHIPPING_lte': int`` - - ``'delta90_EBAY_USED_SHIPPING_gte': int`` - - ``'delta90_LIGHTNING_DEAL_lte': int`` - - ``'delta90_LIGHTNING_DEAL_gte': int`` - - ``'delta90_LISTPRICE_lte': int`` - - ``'delta90_LISTPRICE_gte': int`` - - ``'delta90_NEW_lte': int`` - - ``'delta90_NEW_gte': int`` - - ``'delta90_NEW_FBA_lte': int`` - - ``'delta90_NEW_FBA_gte': int`` - - ``'delta90_NEW_FBM_SHIPPING_lte': int`` - - ``'delta90_NEW_FBM_SHIPPING_gte': int`` - - ``'delta90_RATING_lte': int`` - - ``'delta90_RATING_gte': int`` - - ``'delta90_REFURBISHED_lte': int`` - - ``'delta90_REFURBISHED_gte': int`` - - ``'delta90_REFURBISHED_SHIPPING_lte': int`` - - ``'delta90_REFURBISHED_SHIPPING_gte': int`` - - ``'delta90_RENT_lte': int`` - - ``'delta90_RENT_gte': int`` - - ``'delta90_SALES_lte': int`` - - ``'delta90_SALES_gte': int`` - - ``'delta90_TRADE_IN_lte': int`` - - ``'delta90_TRADE_IN_gte': int`` - - ``'delta90_USED_lte': int`` - - ``'delta90_USED_gte': int`` - - ``'delta90_USED_ACCEPTABLE_SHIPPING_lte': int`` - - ``'delta90_USED_ACCEPTABLE_SHIPPING_gte': int`` - - ``'delta90_USED_GOOD_SHIPPING_lte': int`` - - ``'delta90_USED_GOOD_SHIPPING_gte': int`` - - ``'delta90_USED_NEW_SHIPPING_lte': int`` - - ``'delta90_USED_NEW_SHIPPING_gte': int`` - - ``'delta90_USED_VERY_GOOD_SHIPPING_lte': int`` - - ``'delta90_USED_VERY_GOOD_SHIPPING_gte': int`` - - ``'delta90_WAREHOUSE_lte': int`` - - ``'delta90_WAREHOUSE_gte': int`` - - ``'deltaLast_AMAZON_lte': int`` - - ``'deltaLast_AMAZON_gte': int`` - - ``'deltaLast_BUY_BOX_SHIPPING_lte': int`` - - ``'deltaLast_BUY_BOX_SHIPPING_gte': int`` - - ``'deltaLast_COLLECTIBLE_lte': int`` - - ``'deltaLast_COLLECTIBLE_gte': int`` - - ``'deltaLast_COUNT_COLLECTIBLE_lte': int`` - - ``'deltaLast_COUNT_COLLECTIBLE_gte': int`` - - ``'deltaLast_COUNT_NEW_lte': int`` - - ``'deltaLast_COUNT_NEW_gte': int`` - - ``'deltaLast_COUNT_REFURBISHED_lte': int`` - - ``'deltaLast_COUNT_REFURBISHED_gte': int`` - - ``'deltaLast_COUNT_REVIEWS_lte': int`` - - ``'deltaLast_COUNT_REVIEWS_gte': int`` - - ``'deltaLast_COUNT_USED_lte': int`` - - ``'deltaLast_COUNT_USED_gte': int`` - - ``'deltaLast_EBAY_NEW_SHIPPING_lte': int`` - - ``'deltaLast_EBAY_NEW_SHIPPING_gte': int`` - - ``'deltaLast_EBAY_USED_SHIPPING_lte': int`` - - ``'deltaLast_EBAY_USED_SHIPPING_gte': int`` - - ``'deltaLast_LIGHTNING_DEAL_lte': int`` - - ``'deltaLast_LIGHTNING_DEAL_gte': int`` - - ``'deltaLast_LISTPRICE_lte': int`` - - ``'deltaLast_LISTPRICE_gte': int`` - - ``'deltaLast_NEW_lte': int`` - - ``'deltaLast_NEW_gte': int`` - - ``'deltaLast_NEW_FBA_lte': int`` - - ``'deltaLast_NEW_FBA_gte': int`` - - ``'deltaLast_NEW_FBM_SHIPPING_lte': int`` - - ``'deltaLast_NEW_FBM_SHIPPING_gte': int`` - - ``'deltaLast_RATING_lte': int`` - - ``'deltaLast_RATING_gte': int`` - - ``'deltaLast_REFURBISHED_lte': int`` - - ``'deltaLast_REFURBISHED_gte': int`` - - ``'deltaLast_REFURBISHED_SHIPPING_lte': int`` - - ``'deltaLast_REFURBISHED_SHIPPING_gte': int`` - - ``'deltaLast_RENT_lte': int`` - - ``'deltaLast_RENT_gte': int`` - - ``'deltaLast_SALES_lte': int`` - - ``'deltaLast_SALES_gte': int`` - - ``'deltaLast_TRADE_IN_lte': int`` - - ``'deltaLast_TRADE_IN_gte': int`` - - ``'deltaLast_USED_lte': int`` - - ``'deltaLast_USED_gte': int`` - - ``'deltaLast_USED_ACCEPTABLE_SHIPPING_lte': int`` - - ``'deltaLast_USED_ACCEPTABLE_SHIPPING_gte': int`` - - ``'deltaLast_USED_GOOD_SHIPPING_lte': int`` - - ``'deltaLast_USED_GOOD_SHIPPING_gte': int`` - - ``'deltaLast_USED_NEW_SHIPPING_lte': int`` - - ``'deltaLast_USED_NEW_SHIPPING_gte': int`` - - ``'deltaLast_USED_VERY_GOOD_SHIPPING_lte': int`` - - ``'deltaLast_USED_VERY_GOOD_SHIPPING_gte': int`` - - ``'deltaLast_WAREHOUSE_lte': int`` - - ``'deltaLast_WAREHOUSE_gte': int`` - - ``'deltaPercent1_AMAZON_lte': int`` - - ``'deltaPercent1_AMAZON_gte': int`` - - ``'deltaPercent1_BUY_BOX_SHIPPING_lte': int`` - - ``'deltaPercent1_BUY_BOX_SHIPPING_gte': int`` - - ``'deltaPercent1_COLLECTIBLE_lte': int`` - - ``'deltaPercent1_COLLECTIBLE_gte': int`` - - ``'deltaPercent1_COUNT_COLLECTIBLE_lte': int`` - - ``'deltaPercent1_COUNT_COLLECTIBLE_gte': int`` - - ``'deltaPercent1_COUNT_NEW_lte': int`` - - ``'deltaPercent1_COUNT_NEW_gte': int`` - - ``'deltaPercent1_COUNT_REFURBISHED_lte': int`` - - ``'deltaPercent1_COUNT_REFURBISHED_gte': int`` - - ``'deltaPercent1_COUNT_REVIEWS_lte': int`` - - ``'deltaPercent1_COUNT_REVIEWS_gte': int`` - - ``'deltaPercent1_COUNT_USED_lte': int`` - - ``'deltaPercent1_COUNT_USED_gte': int`` - - ``'deltaPercent1_EBAY_NEW_SHIPPING_lte': int`` - - ``'deltaPercent1_EBAY_NEW_SHIPPING_gte': int`` - - ``'deltaPercent1_EBAY_USED_SHIPPING_lte': int`` - - ``'deltaPercent1_EBAY_USED_SHIPPING_gte': int`` - - ``'deltaPercent1_LIGHTNING_DEAL_lte': int`` - - ``'deltaPercent1_LIGHTNING_DEAL_gte': int`` - - ``'deltaPercent1_LISTPRICE_lte': int`` - - ``'deltaPercent1_LISTPRICE_gte': int`` - - ``'deltaPercent1_NEW_lte': int`` - - ``'deltaPercent1_NEW_gte': int`` - - ``'deltaPercent1_NEW_FBA_lte': int`` - - ``'deltaPercent1_NEW_FBA_gte': int`` - - ``'deltaPercent1_NEW_FBM_SHIPPING_lte': int`` - - ``'deltaPercent1_NEW_FBM_SHIPPING_gte': int`` - - ``'deltaPercent1_RATING_lte': int`` - - ``'deltaPercent1_RATING_gte': int`` - - ``'deltaPercent1_REFURBISHED_lte': int`` - - ``'deltaPercent1_REFURBISHED_gte': int`` - - ``'deltaPercent1_REFURBISHED_SHIPPING_lte': int`` - - ``'deltaPercent1_REFURBISHED_SHIPPING_gte': int`` - - ``'deltaPercent1_RENT_lte': int`` - - ``'deltaPercent1_RENT_gte': int`` - - ``'deltaPercent1_SALES_lte': int`` - - ``'deltaPercent1_SALES_gte': int`` - - ``'deltaPercent1_TRADE_IN_lte': int`` - - ``'deltaPercent1_TRADE_IN_gte': int`` - - ``'deltaPercent1_USED_lte': int`` - - ``'deltaPercent1_USED_gte': int`` - - ``'deltaPercent1_USED_ACCEPTABLE_SHIPPING_lte': int`` - - ``'deltaPercent1_USED_ACCEPTABLE_SHIPPING_gte': int`` - - ``'deltaPercent1_USED_GOOD_SHIPPING_lte': int`` - - ``'deltaPercent1_USED_GOOD_SHIPPING_gte': int`` - - ``'deltaPercent1_USED_NEW_SHIPPING_lte': int`` - - ``'deltaPercent1_USED_NEW_SHIPPING_gte': int`` - - ``'deltaPercent1_USED_VERY_GOOD_SHIPPING_lte': int`` - - ``'deltaPercent1_USED_VERY_GOOD_SHIPPING_gte': int`` - - ``'deltaPercent1_WAREHOUSE_lte': int`` - - ``'deltaPercent1_WAREHOUSE_gte': int`` - - ``'deltaPercent30_AMAZON_lte': int`` - - ``'deltaPercent30_AMAZON_gte': int`` - - ``'deltaPercent30_BUY_BOX_SHIPPING_lte': int`` - - ``'deltaPercent30_BUY_BOX_SHIPPING_gte': int`` - - ``'deltaPercent30_COLLECTIBLE_lte': int`` - - ``'deltaPercent30_COLLECTIBLE_gte': int`` - - ``'deltaPercent30_COUNT_COLLECTIBLE_lte': int`` - - ``'deltaPercent30_COUNT_COLLECTIBLE_gte': int`` - - ``'deltaPercent30_COUNT_NEW_lte': int`` - - ``'deltaPercent30_COUNT_NEW_gte': int`` - - ``'deltaPercent30_COUNT_REFURBISHED_lte': int`` - - ``'deltaPercent30_COUNT_REFURBISHED_gte': int`` - - ``'deltaPercent30_COUNT_REVIEWS_lte': int`` - - ``'deltaPercent30_COUNT_REVIEWS_gte': int`` - - ``'deltaPercent30_COUNT_USED_lte': int`` - - ``'deltaPercent30_COUNT_USED_gte': int`` - - ``'deltaPercent30_EBAY_NEW_SHIPPING_lte': int`` - - ``'deltaPercent30_EBAY_NEW_SHIPPING_gte': int`` - - ``'deltaPercent30_EBAY_USED_SHIPPING_lte': int`` - - ``'deltaPercent30_EBAY_USED_SHIPPING_gte': int`` - - ``'deltaPercent30_LIGHTNING_DEAL_lte': int`` - - ``'deltaPercent30_LIGHTNING_DEAL_gte': int`` - - ``'deltaPercent30_LISTPRICE_lte': int`` - - ``'deltaPercent30_LISTPRICE_gte': int`` - - ``'deltaPercent30_NEW_lte': int`` - - ``'deltaPercent30_NEW_gte': int`` - - ``'deltaPercent30_NEW_FBA_lte': int`` - - ``'deltaPercent30_NEW_FBA_gte': int`` - - ``'deltaPercent30_NEW_FBM_SHIPPING_lte': int`` - - ``'deltaPercent30_NEW_FBM_SHIPPING_gte': int`` - - ``'deltaPercent30_RATING_lte': int`` - - ``'deltaPercent30_RATING_gte': int`` - - ``'deltaPercent30_REFURBISHED_lte': int`` - - ``'deltaPercent30_REFURBISHED_gte': int`` - - ``'deltaPercent30_REFURBISHED_SHIPPING_lte': int`` - - ``'deltaPercent30_REFURBISHED_SHIPPING_gte': int`` - - ``'deltaPercent30_RENT_lte': int`` - - ``'deltaPercent30_RENT_gte': int`` - - ``'deltaPercent30_SALES_lte': int`` - - ``'deltaPercent30_SALES_gte': int`` - - ``'deltaPercent30_TRADE_IN_lte': int`` - - ``'deltaPercent30_TRADE_IN_gte': int`` - - ``'deltaPercent30_USED_lte': int`` - - ``'deltaPercent30_USED_gte': int`` - - ``'deltaPercent30_USED_ACCEPTABLE_SHIPPING_lte': int`` - - ``'deltaPercent30_USED_ACCEPTABLE_SHIPPING_gte': int`` - - ``'deltaPercent30_USED_GOOD_SHIPPING_lte': int`` - - ``'deltaPercent30_USED_GOOD_SHIPPING_gte': int`` - - ``'deltaPercent30_USED_NEW_SHIPPING_lte': int`` - - ``'deltaPercent30_USED_NEW_SHIPPING_gte': int`` - - ``'deltaPercent30_USED_VERY_GOOD_SHIPPING_lte': int`` - - ``'deltaPercent30_USED_VERY_GOOD_SHIPPING_gte': int`` - - ``'deltaPercent30_WAREHOUSE_lte': int`` - - ``'deltaPercent30_WAREHOUSE_gte': int`` - - ``'deltaPercent7_AMAZON_lte': int`` - - ``'deltaPercent7_AMAZON_gte': int`` - - ``'deltaPercent7_BUY_BOX_SHIPPING_lte': int`` - - ``'deltaPercent7_BUY_BOX_SHIPPING_gte': int`` - - ``'deltaPercent7_COLLECTIBLE_lte': int`` - - ``'deltaPercent7_COLLECTIBLE_gte': int`` - - ``'deltaPercent7_COUNT_COLLECTIBLE_lte': int`` - - ``'deltaPercent7_COUNT_COLLECTIBLE_gte': int`` - - ``'deltaPercent7_COUNT_NEW_lte': int`` - - ``'deltaPercent7_COUNT_NEW_gte': int`` - - ``'deltaPercent7_COUNT_REFURBISHED_lte': int`` - - ``'deltaPercent7_COUNT_REFURBISHED_gte': int`` - - ``'deltaPercent7_COUNT_REVIEWS_lte': int`` - - ``'deltaPercent7_COUNT_REVIEWS_gte': int`` - - ``'deltaPercent7_COUNT_USED_lte': int`` - - ``'deltaPercent7_COUNT_USED_gte': int`` - - ``'deltaPercent7_EBAY_NEW_SHIPPING_lte': int`` - - ``'deltaPercent7_EBAY_NEW_SHIPPING_gte': int`` - - ``'deltaPercent7_EBAY_USED_SHIPPING_lte': int`` - - ``'deltaPercent7_EBAY_USED_SHIPPING_gte': int`` - - ``'deltaPercent7_LIGHTNING_DEAL_lte': int`` - - ``'deltaPercent7_LIGHTNING_DEAL_gte': int`` - - ``'deltaPercent7_LISTPRICE_lte': int`` - - ``'deltaPercent7_LISTPRICE_gte': int`` - - ``'deltaPercent7_NEW_lte': int`` - - ``'deltaPercent7_NEW_gte': int`` - - ``'deltaPercent7_NEW_FBA_lte': int`` - - ``'deltaPercent7_NEW_FBA_gte': int`` - - ``'deltaPercent7_NEW_FBM_SHIPPING_lte': int`` - - ``'deltaPercent7_NEW_FBM_SHIPPING_gte': int`` - - ``'deltaPercent7_RATING_lte': int`` - - ``'deltaPercent7_RATING_gte': int`` - - ``'deltaPercent7_REFURBISHED_lte': int`` - - ``'deltaPercent7_REFURBISHED_gte': int`` - - ``'deltaPercent7_REFURBISHED_SHIPPING_lte': int`` - - ``'deltaPercent7_REFURBISHED_SHIPPING_gte': int`` - - ``'deltaPercent7_RENT_lte': int`` - - ``'deltaPercent7_RENT_gte': int`` - - ``'deltaPercent7_SALES_lte': int`` - - ``'deltaPercent7_SALES_gte': int`` - - ``'deltaPercent7_TRADE_IN_lte': int`` - - ``'deltaPercent7_TRADE_IN_gte': int`` - - ``'deltaPercent7_USED_lte': int`` - - ``'deltaPercent7_USED_gte': int`` - - ``'deltaPercent7_USED_ACCEPTABLE_SHIPPING_lte': int`` - - ``'deltaPercent7_USED_ACCEPTABLE_SHIPPING_gte': int`` - - ``'deltaPercent7_USED_GOOD_SHIPPING_lte': int`` - - ``'deltaPercent7_USED_GOOD_SHIPPING_gte': int`` - - ``'deltaPercent7_USED_NEW_SHIPPING_lte': int`` - - ``'deltaPercent7_USED_NEW_SHIPPING_gte': int`` - - ``'deltaPercent7_USED_VERY_GOOD_SHIPPING_lte': int`` - - ``'deltaPercent7_USED_VERY_GOOD_SHIPPING_gte': int`` - - ``'deltaPercent7_WAREHOUSE_lte': int`` - - ``'deltaPercent7_WAREHOUSE_gte': int`` - - ``'deltaPercent90_AMAZON_lte': int`` - - ``'deltaPercent90_AMAZON_gte': int`` - - ``'deltaPercent90_BUY_BOX_SHIPPING_lte': int`` - - ``'deltaPercent90_BUY_BOX_SHIPPING_gte': int`` - - ``'deltaPercent90_COLLECTIBLE_lte': int`` - - ``'deltaPercent90_COLLECTIBLE_gte': int`` - - ``'deltaPercent90_COUNT_COLLECTIBLE_lte': int`` - - ``'deltaPercent90_COUNT_COLLECTIBLE_gte': int`` - - ``'deltaPercent90_COUNT_NEW_lte': int`` - - ``'deltaPercent90_COUNT_NEW_gte': int`` - - ``'deltaPercent90_COUNT_REFURBISHED_lte': int`` - - ``'deltaPercent90_COUNT_REFURBISHED_gte': int`` - - ``'deltaPercent90_COUNT_REVIEWS_lte': int`` - - ``'deltaPercent90_COUNT_REVIEWS_gte': int`` - - ``'deltaPercent90_COUNT_USED_lte': int`` - - ``'deltaPercent90_COUNT_USED_gte': int`` - - ``'deltaPercent90_EBAY_NEW_SHIPPING_lte': int`` - - ``'deltaPercent90_EBAY_NEW_SHIPPING_gte': int`` - - ``'deltaPercent90_EBAY_USED_SHIPPING_lte': int`` - - ``'deltaPercent90_EBAY_USED_SHIPPING_gte': int`` - - ``'deltaPercent90_LIGHTNING_DEAL_lte': int`` - - ``'deltaPercent90_LIGHTNING_DEAL_gte': int`` - - ``'deltaPercent90_LISTPRICE_lte': int`` - - ``'deltaPercent90_LISTPRICE_gte': int`` - - ``'deltaPercent90_NEW_lte': int`` - - ``'deltaPercent90_NEW_gte': int`` - - ``'deltaPercent90_NEW_FBA_lte': int`` - - ``'deltaPercent90_NEW_FBA_gte': int`` - - ``'deltaPercent90_NEW_FBM_SHIPPING_lte': int`` - - ``'deltaPercent90_NEW_FBM_SHIPPING_gte': int`` - - ``'deltaPercent90_RATING_lte': int`` - - ``'deltaPercent90_RATING_gte': int`` - - ``'deltaPercent90_REFURBISHED_lte': int`` - - ``'deltaPercent90_REFURBISHED_gte': int`` - - ``'deltaPercent90_REFURBISHED_SHIPPING_lte': int`` - - ``'deltaPercent90_REFURBISHED_SHIPPING_gte': int`` - - ``'deltaPercent90_RENT_lte': int`` - - ``'deltaPercent90_RENT_gte': int`` - - ``'deltaPercent90_SALES_lte': int`` - - ``'deltaPercent90_SALES_gte': int`` - - ``'deltaPercent90_TRADE_IN_lte': int`` - - ``'deltaPercent90_TRADE_IN_gte': int`` - - ``'deltaPercent90_USED_lte': int`` - - ``'deltaPercent90_USED_gte': int`` - - ``'deltaPercent90_USED_ACCEPTABLE_SHIPPING_lte': int`` - - ``'deltaPercent90_USED_ACCEPTABLE_SHIPPING_gte': int`` - - ``'deltaPercent90_USED_GOOD_SHIPPING_lte': int`` - - ``'deltaPercent90_USED_GOOD_SHIPPING_gte': int`` - - ``'deltaPercent90_USED_NEW_SHIPPING_lte': int`` - - ``'deltaPercent90_USED_NEW_SHIPPING_gte': int`` - - ``'deltaPercent90_USED_VERY_GOOD_SHIPPING_lte': int`` - - ``'deltaPercent90_USED_VERY_GOOD_SHIPPING_gte': int`` - - ``'deltaPercent90_WAREHOUSE_lte': int`` - - ``'deltaPercent90_WAREHOUSE_gte': int`` - - ``'department': str`` - - ``'edition': str`` - - ``'fbaFees_lte': int`` - - ``'fbaFees_gte': int`` - - ``'format': str`` - - ``'genre': str`` - - ``'hasParentASIN': bool`` - - ``'hasReviews': bool`` - - ``'hazardousMaterialType_lte': int`` - - ``'hazardousMaterialType_gte': int`` - - ``'isAdultProduct': bool`` - - ``'isEligibleForSuperSaverShipping': bool`` - - ``'isEligibleForTradeIn': bool`` - - ``'isHighestOffer': bool`` - - ``'isHighest_AMAZON': bool`` - - ``'isHighest_BUY_BOX_SHIPPING': bool`` - - ``'isHighest_COLLECTIBLE': bool`` - - ``'isHighest_COUNT_COLLECTIBLE': bool`` - - ``'isHighest_COUNT_NEW': bool`` - - ``'isHighest_COUNT_REFURBISHED': bool`` - - ``'isHighest_COUNT_REVIEWS': bool`` - - ``'isHighest_COUNT_USED': bool`` - - ``'isHighest_EBAY_NEW_SHIPPING': bool`` - - ``'isHighest_EBAY_USED_SHIPPING': bool`` - - ``'isHighest_LIGHTNING_DEAL': bool`` - - ``'isHighest_LISTPRICE': bool`` - - ``'isHighest_NEW': bool`` - - ``'isHighest_NEW_FBA': bool`` - - ``'isHighest_NEW_FBM_SHIPPING': bool`` - - ``'isHighest_RATING': bool`` - - ``'isHighest_REFURBISHED': bool`` - - ``'isHighest_REFURBISHED_SHIPPING': bool`` - - ``'isHighest_RENT': bool`` - - ``'isHighest_SALES': bool`` - - ``'isHighest_TRADE_IN': bool`` - - ``'isHighest_USED': bool`` - - ``'isHighest_USED_ACCEPTABLE_SHIPPING': bool`` - - ``'isHighest_USED_GOOD_SHIPPING': bool`` - - ``'isHighest_USED_NEW_SHIPPING': bool`` - - ``'isHighest_USED_VERY_GOOD_SHIPPING': bool`` - - ``'isHighest_WAREHOUSE': bool`` - - ``'isLowestOffer': bool`` - - ``'isLowest_AMAZON': bool`` - - ``'isLowest_BUY_BOX_SHIPPING': bool`` - - ``'isLowest_COLLECTIBLE': bool`` - - ``'isLowest_COUNT_COLLECTIBLE': bool`` - - ``'isLowest_COUNT_NEW': bool`` - - ``'isLowest_COUNT_REFURBISHED': bool`` - - ``'isLowest_COUNT_REVIEWS': bool`` - - ``'isLowest_COUNT_USED': bool`` - - ``'isLowest_EBAY_NEW_SHIPPING': bool`` - - ``'isLowest_EBAY_USED_SHIPPING': bool`` - - ``'isLowest_LIGHTNING_DEAL': bool`` - - ``'isLowest_LISTPRICE': bool`` - - ``'isLowest_NEW': bool`` - - ``'isLowest_NEW_FBA': bool`` - - ``'isLowest_NEW_FBM_SHIPPING': bool`` - - ``'isLowest_RATING': bool`` - - ``'isLowest_REFURBISHED': bool`` - - ``'isLowest_REFURBISHED_SHIPPING': bool`` - - ``'isLowest_RENT': bool`` - - ``'isLowest_SALES': bool`` - - ``'isLowest_TRADE_IN': bool`` - - ``'isLowest_USED': bool`` - - ``'isLowest_USED_ACCEPTABLE_SHIPPING': bool`` - - ``'isLowest_USED_GOOD_SHIPPING': bool`` - - ``'isLowest_USED_NEW_SHIPPING': bool`` - - ``'isLowest_USED_VERY_GOOD_SHIPPING': bool`` - - ``'isLowest_WAREHOUSE': bool`` - - ``'isPrimeExclusive': bool`` - - ``'isSNS': bool`` - - ``'label': str`` - - ``'languages': str`` - - ``'lastOffersUpdate_lte': int`` - - ``'lastOffersUpdate_gte': int`` - - ``'lastPriceChange_lte': int`` - - ``'lastPriceChange_gte': int`` - - ``'lastRatingUpdate_lte': int`` - - ``'lastRatingUpdate_gte': int`` - - ``'lastUpdate_lte': int`` - - ``'lastUpdate_gte': int`` - - ``'lightningEnd_lte': int`` - - ``'lightningEnd_gte': int`` - - ``'lightningStart_lte': int`` - - ``'lightningStart_gte': int`` - - ``'listedSince_lte': int`` - - ``'listedSince_gte': int`` - - ``'manufacturer': str`` - - ``'model': str`` - - ``'newPriceIsMAP': bool`` - - ``'nextUpdate_lte': int`` - - ``'nextUpdate_gte': int`` - - ``'numberOfItems_lte': int`` - - ``'numberOfItems_gte': int`` - - ``'numberOfPages_lte': int`` - - ``'numberOfPages_gte': int`` - - ``'numberOfTrackings_lte': int`` - - ``'numberOfTrackings_gte': int`` - - ``'offerCountFBA_lte': int`` - - ``'offerCountFBA_gte': int`` - - ``'offerCountFBM_lte': int`` - - ``'offerCountFBM_gte': int`` - - ``'outOfStockPercentageInInterval_lte': int`` - - ``'outOfStockPercentageInInterval_gte': int`` - - ``'packageDimension_lte': int`` - - ``'packageDimension_gte': int`` - - ``'packageHeight_lte': int`` - - ``'packageHeight_gte': int`` - - ``'packageLength_lte': int`` - - ``'packageLength_gte': int`` - - ``'packageQuantity_lte': int`` - - ``'packageQuantity_gte': int`` - - ``'packageWeight_lte': int`` - - ``'packageWeight_gte': int`` - - ``'packageWidth_lte': int`` - - ``'packageWidth_gte': int`` - - ``'partNumber': str`` - - ``'platform': str`` - - ``'productGroup': str`` - - ``'productType': int`` - - ``'promotions': int`` - - ``'publicationDate_lte': int`` - - ``'publicationDate_gte': int`` - - ``'publisher': str`` - - ``'releaseDate_lte': int`` - - ``'releaseDate_gte': int`` - - ``'rootCategory': int`` - - ``'sellerIds': str`` - - ``'sellerIdsLowestFBA': str`` - - ``'sellerIdsLowestFBM': str`` - - ``'size': str`` - - ``'salesRankDrops180_lte': int`` - - ``'salesRankDrops180_gte': int`` - - ``'salesRankDrops90_lte': int`` - - ``'salesRankDrops90_gte': int`` - - ``'salesRankDrops30_lte': int`` - - ``'salesRankDrops30_gte': int`` - - ``'sort': list`` - - ``'stockAmazon_lte': int`` - - ``'stockAmazon_gte': int`` - - ``'stockBuyBox_lte': int`` - - ``'stockBuyBox_gte': int`` - - ``'studio': str`` - - ``'title': str`` - - ``'title_flag': str`` - - ``'trackingSince_lte': int`` - - ``'trackingSince_gte': int`` - - ``'type': str`` - - ``'mpn': str`` - - ``'outOfStockPercentage90_lte': int`` - - ``'outOfStockPercentage90_gte': int`` - - ``'categories_include': int`` - - ``'categories_exclude': int`` - - domain : str, default: 'US' - One of the following Amazon domains: RESERVED, US, GB, DE, - FR, JP, CA, CN, IT, ES, IN, MX. - + product_parms : dict, ProductParams + Dictionary or :class:`keepa.ProductParams`. + domain : str | keepa.Domain, default: 'US' + A valid Amazon domain. See :class:`keepa.Domain`. wait : bool, default: True Wait available token before doing effective query. - - n_products : int, default 50 + n_products : int, default: 50 Maximum number of matching products returned by keepa. Returns ------- - list + list[str] List of ASINs matching the product parameters. Notes @@ -2390,6 +1411,14 @@ def product_finder(self, product_parms, domain="US", wait=True, n_products=50) - '0133235750', 'B01MXXLJPZ'] + Alternatively, use the :class:`keepa.ProductParams`: + + >>> product_parms = keepa.ProductParams( + ... author="jim butcher", + ... sort=["current_SALES", "asc"], + ... ) + >>> asins = api.product_finder(product_parms, n_products=100) + Query for all of Jim Butcher's books using the asynchronous ``keepa.AsyncKeepa`` class. @@ -2412,25 +1441,21 @@ def product_finder(self, product_parms, domain="US", wait=True, n_products=50) - 'B01MXXLJPZ'] """ - # verify valid keys - for key in product_parms: - if key not in PRODUCT_REQUEST_KEYS: - raise ValueError(f'Invalid key "{key}"') - - # verify json type - key_type = PRODUCT_REQUEST_KEYS[key] - product_parms[key] = key_type(product_parms[key]) - + if isinstance(product_parms, dict): + product_parms_valid = ProductParams(**product_parms) + else: + product_parms_valid = product_parms + product_parms_dict = product_parms_valid.model_dump(exclude_none=True) payload = { "key": self.accesskey, - "domain": DCODES.index(domain), - "selection": json.dumps({**product_parms, **{"perPage": n_products}}), + "domain": _domain_to_dcode(domain), + "selection": json.dumps({**product_parms_dict, **{"perPage": n_products}}), } response = self._request("query", payload, wait=wait) return response["asinList"] - def deals(self, deal_parms, domain="US", wait=True) -> dict: + def deals(self, deal_parms, domain: Union[str, Domain] = "US", wait=True) -> dict: """Query the Keepa API for product deals. You can find products that recently changed and match your @@ -2469,9 +1494,8 @@ def deals(self, deal_parms, domain="US", wait=True) -> dict: - ``"sortType"``: int - ``"dateRange"``: int - domain : str, optional - One of the following Amazon domains: RESERVED, US, GB, DE, - FR, JP, CA, CN, IT, ES, IN, MX Defaults to US. + domain : str | keepa.Domain, default: 'US' + A valid Amazon domain. See :class:`keepa.Domain`. wait : bool, optional Wait available token before doing effective query, Defaults to ``True``. @@ -2552,7 +1576,7 @@ def deals(self, deal_parms, domain="US", wait=True) -> dict: payload = { "key": self.accesskey, - "domain": DCODES.index(domain), + "domain": _domain_to_dcode(domain), "selection": json.dumps(deal_parms), } @@ -2827,7 +1851,7 @@ async def _product_query(self, items, product_code_is_asin=True, **kwargs): kwargs["code"] = ",".join(items) kwargs["key"] = self.accesskey - kwargs["domain"] = DCODES.index(kwargs["domain"]) + kwargs["domain"] = _domain_to_dcode(kwargs["domain"]) # Convert bool values to 0 and 1. kwargs["stock"] = int(kwargs["stock"]) @@ -2881,16 +1905,13 @@ async def _product_query(self, items, product_code_is_asin=True, **kwargs): return response @is_documented_by(Keepa.best_sellers_query) - async def best_sellers_query(self, category, rank_avg_range=0, domain="US", wait=True): + async def best_sellers_query( + self, category, rank_avg_range=0, domain: Union[str, Domain] = "US", wait=True + ): """Documented by Keepa.best_sellers_query.""" - if domain not in DCODES: - raise ValueError( - f"Invalid domain code {domain}. Should be one of the following:\n{DCODES}" - ) - payload = { "key": self.accesskey, - "domain": DCODES.index(domain), + "domain": _domain_to_dcode(domain), "category": category, "range": rank_avg_range, } @@ -2902,16 +1923,11 @@ async def best_sellers_query(self, category, rank_avg_range=0, domain="US", wait log.info("Best sellers search results not yet available") @is_documented_by(Keepa.search_for_categories) - async def search_for_categories(self, searchterm, domain="US", wait=True): + async def search_for_categories(self, searchterm, domain: Union[str, Domain] = "US", wait=True): """Documented by Keepa.search_for_categories.""" - if domain not in DCODES: - raise ValueError( - f"Invalid domain code {domain}. Should be one of the following:\n{DCODES}" - ) - payload = { "key": self.accesskey, - "domain": DCODES.index(domain), + "domain": _domain_to_dcode(domain), "type": "category", "term": searchterm, } @@ -2925,16 +1941,13 @@ async def search_for_categories(self, searchterm, domain="US", wait=True): return response["categories"] @is_documented_by(Keepa.category_lookup) - async def category_lookup(self, category_id, domain="US", include_parents=0, wait=True): + async def category_lookup( + self, category_id, domain: Union[str, Domain] = "US", include_parents=0, wait=True + ): """Documented by Keepa.category_lookup.""" - if domain not in DCODES: - raise ValueError( - f"Invalid domain code {domain}. Should be one of the following:\n{DCODES}" - ) - payload = { "key": self.accesskey, - "domain": DCODES.index(domain), + "domain": _domain_to_dcode(domain), "category": category_id, "parents": include_parents, } @@ -2949,7 +1962,7 @@ async def category_lookup(self, category_id, domain="US", include_parents=0, wai async def seller_query( self, seller_id, - domain="US", + domain: Union[str, Domain] = "US", to_datetime=True, storefront=False, update=None, @@ -2966,7 +1979,7 @@ async def seller_query( payload = { "key": self.accesskey, - "domain": DCODES.index(domain), + "domain": _domain_to_dcode(domain), "seller": seller, } @@ -2979,28 +1992,30 @@ async def seller_query( return _parse_seller(response["sellers"], to_datetime) @is_documented_by(Keepa.product_finder) - async def product_finder(self, product_parms, domain="US", wait=True): + async def product_finder( + self, + product_parms: Union[Dict[str, Any], ProductParams], + domain: Union[str, Domain] = "US", + wait=True, + n_products=50, + ) -> List[str]: """Documented by Keepa.product_finder.""" - # verify valid keys - for key in product_parms: - if key not in PRODUCT_REQUEST_KEYS: - raise RuntimeError('Invalid key "%s"' % key) - - # verify json type - key_type = PRODUCT_REQUEST_KEYS[key] - product_parms[key] = key_type(product_parms[key]) - + if isinstance(product_parms, dict): + product_parms_valid = ProductParams(**product_parms) + else: + product_parms_valid = product_parms + product_parms_dict = product_parms_valid.model_dump(exclude_none=True) payload = { "key": self.accesskey, - "domain": DCODES.index(domain), - "selection": json.dumps(product_parms), + "domain": _domain_to_dcode(domain), + "selection": json.dumps({**product_parms_dict, **{"perPage": n_products}}), } response = await self._request("query", payload, wait=wait) return response["asinList"] @is_documented_by(Keepa.deals) - async def deals(self, deal_parms, domain="US", wait=True): + async def deals(self, deal_parms, domain: Union[str, Domain] = "US", wait=True): """Documented in Keepa.deals.""" # verify valid keys for key in deal_parms: @@ -3015,7 +2030,7 @@ async def deals(self, deal_parms, domain="US", wait=True): payload = { "key": self.accesskey, - "domain": DCODES.index(domain), + "domain": _domain_to_dcode(domain), "selection": json.dumps(deal_parms), } diff --git a/tests/test_async_interface.py b/tests/test_async_interface.py index 7126a1e..d016e4e 100644 --- a/tests/test_async_interface.py +++ b/tests/test_async_interface.py @@ -122,6 +122,16 @@ async def test_product_finder_query(api): asins = await api.product_finder(product_parms) assert asins + # using ProductParams + product_parms = keepa.ProductParams( + author="jim butcher", + page=1, + perPage=50, + categories_exclude=["1055398"], + ) + asins = api.product_finder(product_parms) + assert asins + # def test_throttling(api): # api = keepa.Keepa(WEAKTESTINGKEY) diff --git a/tests/test_interface.py b/tests/test_interface.py index e48fd56..e9399e1 100644 --- a/tests/test_interface.py +++ b/tests/test_interface.py @@ -135,6 +135,16 @@ def test_product_finder_query(api): asins = api.product_finder(product_parms) assert asins + # using ProductParams + product_parms = keepa.ProductParams( + author="jim butcher", + page=1, + perPage=50, + categories_exclude=["1055398"], + ) + asins = api.product_finder(product_parms) + assert asins + # def test_throttling(api): # api = keepa.Keepa(WEAKTESTINGKEY)