{"id":29638802,"url":"https://github.com/coderjoshdk/wiopy","last_synced_at":"2025-10-04T02:12:09.314Z","repository":{"id":44882898,"uuid":"450159611","full_name":"CoderJoshDK/WIOpy","owner":"CoderJoshDK","description":"Walmart Affiliate API Python wrapper","archived":false,"fork":false,"pushed_at":"2025-07-22T13:51:55.000Z","size":326,"stargazers_count":13,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-21T09:35:52.216Z","etag":null,"topics":["api","api-wrapper","python","python3","walmart"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CoderJoshDK.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-01-20T15:50:25.000Z","updated_at":"2025-08-20T06:56:37.000Z","dependencies_parsed_at":"2024-01-08T03:00:43.464Z","dependency_job_id":"d44b1a56-6617-42de-a084-fb6e4379b367","html_url":"https://github.com/CoderJoshDK/WIOpy","commit_stats":{"total_commits":39,"total_committers":1,"mean_commits":39.0,"dds":0.0,"last_synced_commit":"19da333d8a3194b85bb6cd0e97099c3faf4eb290"},"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"purl":"pkg:github/CoderJoshDK/WIOpy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CoderJoshDK%2FWIOpy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CoderJoshDK%2FWIOpy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CoderJoshDK%2FWIOpy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CoderJoshDK%2FWIOpy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CoderJoshDK","download_url":"https://codeload.github.com/CoderJoshDK/WIOpy/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CoderJoshDK%2FWIOpy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278254466,"owners_count":25956604,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-04T02:00:05.491Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","api-wrapper","python","python3","walmart"],"created_at":"2025-07-21T20:04:05.650Z","updated_at":"2025-10-04T02:12:09.295Z","avatar_url":"https://github.com/CoderJoshDK.png","language":"Python","readme":"[![Python](https://img.shields.io/badge/Python-\u003e=3.8-%23FFD140)](https://www.python.org/)\n[![PyPI](https://img.shields.io/pypi/v/WIOpy)](https://pypi.org/project/WIOpy/)\n[![GitHub release (latest by date including pre-releases)](https://img.shields.io/github/v/release/CoderJoshDK/WIOpy?include_prereleases)](https://github.com/CoderJoshDK/WIOpy) [![GitHub issues](https://img.shields.io/github/issues/CoderJoshDK/WIOpy)](https://github.com/CoderJoshDK/WIOpy/issues)\n[![GitHub Repo stars](https://img.shields.io/github/stars/CoderJoshDK/WIOpy?style=social)](https://github.com/CoderJoshDK/WIOpy)\n\n# WalmartIO Python Wrapper - WIOpy\n\nA python wrapper for the Walmart io API. Only supports the Affiliate API for now. The project is open to contributions\n\n## Getting it\n\nTo download WIOpy, either fork this github repo or simply use Pypi via pip.\n\n```sh\npip install WIOpy\n```\n\nTo upgrade the package simply run  \n\n```sh\npip install WIOpy --upgrade\n```\n\n## How to use  \n\nAn example of creating a WIOpy connection\nOne important note is that you need to pass in the private key file *path*.  \n\n```py\nfrom wiopy import WalmartIO\nwalmart_io = WalmartIO(\n    private_key_version=\"1\",\n    private_key_filename=\"./WM_IO_private_key.pem\",\n    consumer_id='XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX',\n    publisherId=\"XXXXXXX\",\n)\ndata = walmart_io.product_lookup('33093101')[0]\n```\n\nWIOpy also supports asynchronous calls. To use, everything will be the same but you must await a call and the constructed object is different.\n\n```py\nfrom wiopy import AsyncWalmartIO\nasync_walmart_io = AsyncWalmartIO(...)\ndata = await async_walmart_io.product_lookup('33093101')[0]\n```\n\n## Response Examples\n\nWhen making a call to the API, an object will be returned. That object is an object version of returned JSON.  \nThere are two ways to get info from the object:\n\n- `data.name`  \n- `data['name']`  \nAn example of a returned object and one that is not (review/search are variables returned):\n- `review.reviewStatistics.averageOverallRating` # Nested call\n- `search.facets` # Gives back a dict that can now be used like a dict and not object  \nSome attributes will return a dict and not an object due to a lack of documentation from Walmart.  \nWhen getting an attribute from a `WalmartResponse`, it will return either `response` or `None`\\. But trying to get an attribute of `None` will still raise an error.\n[Extra details on calls and responses](walmart.io/docs). However, the docs are inconsistent and lack typical practices such as response schema. That is why something like the search facets response is missing because the docs show it is in the response but not what type of data it will contain.  \nWhile there may be a response missing or a response not being converted to an object, please check [WalmartResponse](./wiopy/WalmartResponse.py) to get an idea of what a response will return. Some properties are not always present in a response.  \n\n## Examples of calls\n\n### [Catalog Product](https://walmart.io/docs/affiliate/paginated-items)\n\nCatalog Product API allows a developer to retrieve the products catalog in a paginated fashion. Catalog can be filtered by category, brand and/or any special offers like rollback, clearance etc.\n\n```py\ndata = walmart_io.catalog_product(category='3944', maxId='8342714')\n```\n\nA catalog response contains category, format, nextPage, totalPages, and a list of items\n\nThe returned API data is paginated. To get the next page, pass in `data.nextPage` as a kwarg.\nAll other kwargs will be stripped out. They will be embed in the nextPage response.\n\n```py\ndata = walmart_io.catalog_product(category=\"3944\", maxId=\"8342714\")\nnext_data = walmart_io.catalog_product(nextPage=data.nextPage)\n# or\nnext_data = walmart_io.catalog_product(category=\"3944\", maxId=\"8342714\", nextPage=data.nextPage) \n```\n\n### [Post Browsed Products](https://walmart.io/docs/affiliate/post-browsed-products)\n\nThe post browsed products API allows you to recommend products to someone based on their product viewing history.\n\n```py\ndata = walmart_io.post_browsed_products('54518466')\n```\n\nResponse gives top 10 relevant items to the given id\n\n### [Product lookup](https://walmart.io/docs/affiliate/product-lookup)\n\nThere are two ways to lookup a product\nThe first is to pass a single string in\n\n```py\ndata = walmart_io.product_lookup('33093101')[0]\n```\n\nor you can pass a list of strings\n\n```py\ndata = walmart_io.product_lookup('33093101, 54518466, 516833054')\ndata = walmart_io.product_lookup(['33093101', '54518466', '516833054'])\n```\n\nRemember: product_lookup always returns a list of [WalmartProducts](https://walmart.io/docs/affiliate/item_response_groups)  \n\n### [Bulk product lookup](https://walmart.io/docs/affiliate/product-lookup)\n\n`bulk_product_lookup` is similar to `product_lookup` however, the bulk version does not raise errors and it is a generator.  \nItems are passed in as chunks of max size 20. If an error occurs on that call, the same call will be retried based on the given amount. If error still occurs, all items will be lost. But the entire call will not be lost.  \n\n```py\ndata = walmart_io.bulk_product_lookup('33093101, 54518466, 516833054', amount=1, retries=3)\nfor items in data:\n    for item in items:\n        print(item)\n```\n\nResponse gives generator of [WalmartProducts](https://walmart.io/docs/affiliate/item_response_groups)  \nIf you are unfamiliar with async generators; to properly call the async version:\n\n```py\ndata = async_walmart_io.bulk_product_lookup('33093101, 54518466, 516833054')\nasync for items in data:\n    ...\n```\n\n### [Product Recommendation](https://walmart.io/docs/affiliate/product-recommendation)\n\nGet recommendations based on a given product id\n\n```py\ndata = walmart_io.product_recommendation('54518466')\n```\n\nResponse gives a list of related products\n\n### [Reviews](https://walmart.io/docs/affiliate/reviews)\n\nThe Reviews API gives you access to the extensive item reviews on Walmart that have been written by the users of Walmart.com\n\n```py\ndata = walmart_io.reviews('33093101')\n```\n\nResponse gives review data\n\n### [Search](https://walmart.io/docs/affiliate/search)\n\nSearch API allows text search on the Walmart.com catalogue and returns matching items available for sale online.\n\n```py\n# Search for tv within electronics and sort by increasing price:\ndata = walmart_io.search('tv', categoryId='3944', sort='price', order='ascending')\n```\n\nYou can also add facets to your search\n\n```py\ndata = walmart_io.search('tv', filter='brand:Samsung')\n```\n\nThe search response gives back a list of products and some meta data. It returns a `facets` element but there is no detail on the API about what it could return. It is a list of some unknown type\n\n### [Stores](https://walmart.io/docs/affiliate/stores)\n\nThe API can return a list of closest stores near a specified location. Either zip code or lon/lat  \n\n```py\ndata = walmart_io.stores(lat=29.735577, lon=-95.511747)\n```\n\n### [Taxonomy](https://walmart.io/docs/affiliate/taxonomy)\n\nThe taxonomy service exposes the taxonomy used to categorize items on Walmart.com.  \nDetails about params is missing from docs\n\n```py\ndata = walmart_io.taxonomy()\n```\n\n### [Trending Items](https://walmart.io/docs/affiliate/trending-items)\n\nThe Trending Items API is designed to give the information on what is bestselling on Walmart.com right now.\n\n```py\ndata = walmart_io.trending()\n```\n\n## Logging\n\nWIOpy supports logging via the logging module. Configuration of the logging module can be as simple as:\n\n```py\nimport logging\n\nlogging.basicConfig(level=logging.INFO)\n```\n\n-------\n![License](https://img.shields.io/github/license/CoderJoshDK/WIOpy)\n![GitHub last commit](https://img.shields.io/github/last-commit/CoderJoshDK/WIOpy)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoderjoshdk%2Fwiopy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoderjoshdk%2Fwiopy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoderjoshdk%2Fwiopy/lists"}